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: Sat, 29 Jun 2019 10:11:40 -0700 Organization: UCLA Computer Science Department Message-ID: <99bacb9f-1192-1315-85d7-5ab4924dfef8__35320.2921965689$1561828366$gmane$org@cs.ucla.edu> References: <2067160.1HRgjLhtDS@omega> <2515002.Q0mBYvUW8C@omega> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5B2A11EADDDA2B68ABEB62B9" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="170782"; 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: Bruno Haible , Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 29 19:12:41 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 1hhGtz-000iHG-K2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jun 2019 19:12:39 +0200 Original-Received: from localhost ([::1]:41536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhGty-0006d0-NA for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jun 2019 13:12:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58681) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhGtU-0006aU-L7 for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 13:12:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhGtP-0005F8-Hb for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 13:12:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59551) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhGtO-0005ED-Gk for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 13:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hhGtO-0004jU-Ay for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 13:12: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 17:12: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.156182831618168 (code B ref 36370); Sat, 29 Jun 2019 17:12:02 +0000 Original-Received: (at 36370) by debbugs.gnu.org; 29 Jun 2019 17:11:56 +0000 Original-Received: from localhost ([127.0.0.1]:44862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhGtI-0004ix-A0 for submit@debbugs.gnu.org; Sat, 29 Jun 2019 13:11:56 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhGtG-0004iY-8c for 36370@debbugs.gnu.org; Sat, 29 Jun 2019 13:11:55 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1C3D2161D51; Sat, 29 Jun 2019 10:11:48 -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 lpYml8JESCC8; Sat, 29 Jun 2019 10:11:43 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9C00B161D92; Sat, 29 Jun 2019 10:11:43 -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 nWbzsneUassO; Sat, 29 Jun 2019 10:11:43 -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 59286161D51; Sat, 29 Jun 2019 10:11:43 -0700 (PDT) In-Reply-To: <2515002.Q0mBYvUW8C@omega> 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:161835 Archived-At: This is a multi-part message in MIME format. --------------5B2A11EADDDA2B68ABEB62B9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Bruno Haible wrote: > + If you want the use of this macro to improve, not deteriorate, > + performance, R should not contain function calls except to functions > + that are declared 'inline __attribute__((__always_inline__))'. */ A reader of that might incorrectly conclude that using such functions will always improve performance, compared to using functions not declared that way. And I'm leery of putting such GCC-specific info into the documentation of a generic macro. Also, given Pip Cet's misunderstanding it'd be helpful to add a word or two about the intent of 'assume (R)'. How about the attached patch? > - evaluated. Behavior is undefined if R is false. */ > + evaluated. The behavior is undefined if R is false. This is a nit, but to my ears the shorter version is better, and has a more-accurate connotation as "the behavior" connotes "the behavior of 'assume (R)'", whereas behavior is also undefined for code before or after a call to an incorrect 'assume (R)'. --------------5B2A11EADDDA2B68ABEB62B9 Content-Type: text/x-patch; name="verify.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="verify.diff" diff --git a/lib/verify.h b/lib/verify.h index f8e4eff02..168a7afdb 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -259,9 +259,11 @@ template # define __has_builtin(x) 0 #endif -/* Assume that R always holds. This lets the compiler optimize - accordingly. R should not have side-effects; it may or may not be - evaluated. Behavior is undefined if R is false. */ +/* Assume that R always holds. Behavior is undefined if R is false. + R should lack side effects, as it may be evaluated only partially. + Although 'assume (R)' is typically intended to help performance, + performance may degrade if R uses hard-to-optimize features + such as calls to non-inlined functions. */ #if (__has_builtin (__builtin_unreachable) \ || 4 < __GNUC__ + (5 <= __GNUC_MINOR__)) --------------5B2A11EADDDA2B68ABEB62B9--