From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#36370: 27.0.50; XFIXNAT called on negative numbers Date: Fri, 28 Jun 2019 22:41:02 -0700 Organization: UCLA Computer Science Department Message-ID: <87168b28-192b-6666-e9b6-9cdc2ed3917a__35046.9559592725$1561786946$gmane$org@cs.ucla.edu> References: <2715311.ceefYqj39C@omega> <8979488.cRkkfcT1mV@omega> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="139711"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 Cc: 36370@debbugs.gnu.org, Bruno Haible , bug-gnulib@gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 29 07:42:21 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hh67x-000aGY-Mt for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jun 2019 07:42:21 +0200 Original-Received: from localhost ([::1]:37762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hh67w-00032E-Jg for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jun 2019 01:42:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54452) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hh67f-00031q-Hh for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 01:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hh67e-00036o-E1 for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 01:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hh67e-000364-8C for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 01:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hh67e-0000eb-3v for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 01:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jun 2019 05:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36370 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36370-submit@debbugs.gnu.org id=B36370.15617868702452 (code B ref 36370); Sat, 29 Jun 2019 05:42:02 +0000 Original-Received: (at 36370) by debbugs.gnu.org; 29 Jun 2019 05:41:10 +0000 Original-Received: from localhost ([127.0.0.1]:43288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hh66o-0000dU-6J for submit@debbugs.gnu.org; Sat, 29 Jun 2019 01:41:10 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hh66m-0000dF-Ly for 36370@debbugs.gnu.org; Sat, 29 Jun 2019 01:41:08 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 59C4C161D2F; Fri, 28 Jun 2019 22:41:03 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 0Yrq8wcTs_dY; Fri, 28 Jun 2019 22:41:02 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 918ED161D50; Fri, 28 Jun 2019 22:41:02 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id eFmXQ182X_fy; Fri, 28 Jun 2019 22:41:02 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 636D1161D2F; Fri, 28 Jun 2019 22:41:02 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161790 Archived-At: Pip Cet wrote: > eassume (global == 0); > eassume (f ()); > #else > eassume (global == 0 && f ()); > ... > extern int global; > > int f(void) > { > return ++global; > } This is not a valid use of 'assume'. It's documented that assume's argument should be free of side effects. It would be nice if 'assume (R)' reported an error if R has side effects, and generated a warning unless the compiler can verify that R is free of side effects. However, these niceties would require better support from the compiler. > If you want your program to behave predictably, in the strict sense, > you cannot ever use the current assume() API. I'm not sure what you mean by "in the strict sense". It's true that programs can misuse 'assume' and get undefined behavior, but that's kind of the point....