From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: __builtin_assume warnings Date: Mon, 17 Aug 2020 16:05:10 +0200 Message-ID: References: <8e65e2a9-1058-3084-7f8d-8439fa908fb3@cs.ucla.edu> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 17 16:06:42 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7fmc-00051c-Ab for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Aug 2020 16:06:42 +0200 Original-Received: from localhost ([::1]:36474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7fmb-0002d9-Bp for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Aug 2020 10:06:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7fld-0001Gg-49 for emacs-devel@gnu.org; Mon, 17 Aug 2020 10:05:41 -0400 Original-Received: from mail1463c50.megamailservers.eu ([91.136.14.63]:52188 helo=mail268c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7fla-0001wH-Dh for emacs-devel@gnu.org; Mon, 17 Aug 2020 10:05:40 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1597673115; bh=UbhyuM+siln54vpFGcM4i/fBv3DmCRdk+/IQIk85OQA=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=YRipjMh/mgLhdpNzWd4VpIDRLXsqTrLMCcUQiU2DrbH2GT3R3st3nBO/IQJmcjpaC NPF+ijID1joHGiQx+KschWQmVStRDGJXR29Nt27S/ur9/mF+TcV+ekT1MhA2aDUSEh 1VsGQk6/WiDKBnKtrCPXscOkELktvrW+wTt1HxDI= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 07HE5B3A013902; Mon, 17 Aug 2020 14:05:14 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1A.5F3A8E9B.0008, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=BZ+mLYl2 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=N54-gffFAAAA:8 a=9fAD0I6tUPET9DY07NsA:9 a=QEXdDO2ut3YA:10 a=6l0D2HzqY3Epnrm8mE3f:22 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.14.63; envelope-from=mattiase@acm.org; helo=mail268c50.megamailservers.eu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/17 10:05:24 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:253879 Archived-At: 16 aug. 2020 kl. 10.23 skrev Mattias Engdeg=C3=A5rd : >=20 > 15 aug. 2020 kl. 04.32 skrev Paul Eggert : >>=20 >> On 8/12/20 2:38 AM, Mattias Engdeg=C3=A5rd wrote: >>> ../../emacs/src/lisp.h:1812:12: warning: the argument to = '__builtin_assume' has >>> side effects that will be discarded [-Wassume] >>> eassume (0 <=3D i && i < bool_vector_size (a)); >>=20 >> Thanks for mentioning that. I installed the attached, which should = pacify clang there. Actually, there are warnings in more places. Looks like Clang does not = yet look inside inline functions for -Wassume. frame.c:1686:12: warning: the argument to '__builtin_assume' has side = effects that will be discarded [-Wassume] eassume (CONSP (Vframe_list)); ^~~~~~~~~~~~~~~~~~~ ./lisp.h:182:32: note: expanded from macro 'eassume' # define eassume(cond) assume (cond) ^~~~ ../lib/verify.h:305:38: note: expanded from macro 'assume' # define assume(R) __builtin_assume (R) ^ frame.c:1710:12: warning: the argument to '__builtin_assume' has side = effects that will be discarded [-Wassume] eassume (CONSP (Vframe_list)); ^~~~~~~~~~~~~~~~~~~ ./lisp.h:182:32: note: expanded from macro 'eassume' # define eassume(cond) assume (cond) ^~~~ ../lib/verify.h:305:38: note: expanded from macro 'assume' # define assume(R) __builtin_assume (R) ^ frame.c:2020:16: warning: the argument to '__builtin_assume' has side = effects that will be discarded [-Wassume] eassume (CONSP (Vframe_list)); ^~~~~~~~~~~~~~~~~~~ ./lisp.h:182:32: note: expanded from macro 'eassume' # define eassume(cond) assume (cond) ^~~~ ../lib/verify.h:305:38: note: expanded from macro 'assume' # define assume(R) __builtin_assume (R) ^ character.c:814:16: warning: the argument to '__builtin_assume' has side = effects that will be discarded [-Wassume] eassume (CHARACTERP (args[i])); ^~~~~~~~~~~~~~~~~~~~ ./lisp.h:182:32: note: expanded from macro 'eassume' # define eassume(cond) assume (cond) ^~~~ ../lib/verify.h:305:38: note: expanded from macro 'assume' # define assume(R) __builtin_assume (R) ^ alloc.c:1935:12: warning: the argument to '__builtin_assume' has side = effects that will be discarded [-Wassume] eassume (STRING_MULTIBYTE (string)); ^~~~~~~~~~~~~~~~~~~~~~~~~ ./lisp.h:182:32: note: expanded from macro 'eassume' # define eassume(cond) assume (cond) ^~~~ ../lib/verify.h:305:38: note: expanded from macro 'assume' # define assume(R) __builtin_assume (R) ^ data.c:3153:12: warning: the argument to '__builtin_assume' has side = effects that will be discarded [-Wassume] eassume (FIXNUMP (value)); ^~~~~~~~~~~~~~~ ./lisp.h:182:32: note: expanded from macro 'eassume' # define eassume(cond) assume (cond) ^~~~ ../lib/verify.h:305:38: note: expanded from macro 'assume' # define assume(R) __builtin_assume (R) ^