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 10:46:52 -0700 Organization: UCLA Computer Science Department Message-ID: 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="235124"; 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, bug-gnulib@gnu.org To: Pip Cet , Bruno Haible Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 28 20:33:55 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 1hgvh4-000yv7-GT for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2019 20:33:54 +0200 Original-Received: from localhost ([::1]:35358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgvh3-0000we-G5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2019 14:33:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57909) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hguyz-0000rF-2b for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 13:48:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hguyr-0004PQ-Mz for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 13:48:16 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57611) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hguyg-0004Ie-01 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 13:48:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hguyf-0008JZ-Tz for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 13:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2019 17:48:01 +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.156174402231884 (code B ref 36370); Fri, 28 Jun 2019 17:48:01 +0000 Original-Received: (at 36370) by debbugs.gnu.org; 28 Jun 2019 17:47:02 +0000 Original-Received: from localhost ([127.0.0.1]:42922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hguxh-0008I2-Is for submit@debbugs.gnu.org; Fri, 28 Jun 2019 13:47:01 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hguxf-0008Hi-BJ for 36370@debbugs.gnu.org; Fri, 28 Jun 2019 13:47:00 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A473A161C3F; Fri, 28 Jun 2019 10:46:53 -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 02YE2pDQwSmy; Fri, 28 Jun 2019 10:46:52 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CD3F0161CCD; Fri, 28 Jun 2019 10:46:52 -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 jskSkVipUJ65; Fri, 28 Jun 2019 10:46:52 -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 9FEC5161C3F; Fri, 28 Jun 2019 10:46:52 -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:161751 Archived-At: Pip Cet wrote: > It's way too easy > to do something like > > eassume(ptr->field >= 0 && f(ptr)); > > when what you mean is > > eassume(ptr->field >= 0); > eassume(f(ptr)); These mean the same thing. Both tell the compiler that a certain condition (A && B) is known to be true, and that behavior is undefined if (A && B) is false. The fact that Gnulib+GCC implements them differently is a quality-of-implementation issue, not a semantics issue. > I'm saying that the programmer is > allowed to assume that the expression passed to assume either has been > evaluated, or hasn't been, with no in-between interpretations allowed > to the compiler. I don't see why that assumption is valid. It's OK if GCC partially evaluates the expression. As a silly example, eassume (0 * dump_core () + getchar ()) is not required to call dump_core, even if the compiler generates a call to getchar. Perhaps we should change the comments in verify.h to make this point clearer.