From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#23640: 25.1.50; Getting rid of compiler warnings Date: Mon, 30 May 2016 16:29:15 -0700 Organization: UCLA Computer Science Department Message-ID: <574CCCCB.7000209@cs.ucla.edu> References: <83mvnaxb6u.fsf@gnu.org> <13ba9f48-d461-5e4d-7017-20b3aec2b98c@cornell.edu> <7db1f3b9-4464-055a-626b-2a21ae7ddfa8@cornell.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1464651027 15859 80.91.229.3 (30 May 2016 23:30:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 May 2016 23:30:27 +0000 (UTC) Cc: 23640@debbugs.gnu.org, Andy Moreton To: Ken Brown , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 31 01:30:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b7WdR-00009R-FZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 May 2016 01:30:13 +0200 Original-Received: from localhost ([::1]:33602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7WdQ-0004av-B3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 May 2016 19:30:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7WdK-0004Z3-KT for bug-gnu-emacs@gnu.org; Mon, 30 May 2016 19:30:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7WdG-00083r-Ci for bug-gnu-emacs@gnu.org; Mon, 30 May 2016 19:30:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7WdG-00083n-9V for bug-gnu-emacs@gnu.org; Mon, 30 May 2016 19:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b7WdG-0004Qh-1O for bug-gnu-emacs@gnu.org; Mon, 30 May 2016 19:30: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: Mon, 30 May 2016 23:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23640-submit@debbugs.gnu.org id=B23640.146465096616962 (code B ref 23640); Mon, 30 May 2016 23:30:01 +0000 Original-Received: (at 23640) by debbugs.gnu.org; 30 May 2016 23:29:26 +0000 Original-Received: from localhost ([127.0.0.1]:47888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7Wcg-0004PV-0W for submit@debbugs.gnu.org; Mon, 30 May 2016 19:29:26 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7Wcd-0004PG-MQ for 23640@debbugs.gnu.org; Mon, 30 May 2016 19:29:24 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CFAED161385; Mon, 30 May 2016 16:29:16 -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 Cr0mMur-HsmQ; Mon, 30 May 2016 16:29:15 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E11EB1613EA; Mon, 30 May 2016 16:29:15 -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 70RQ50j98DM0; Mon, 30 May 2016 16:29:15 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id BE6F0161385; Mon, 30 May 2016 16:29:15 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: 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: 208.118.235.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:118878 Archived-At: Ken Brown wrote: > Why not just unconditionally initialize the variables that gcc complain= s about? That could make the code harder to understand. Someone who sees "int i =3D= 0;" can=20 reasonably infer that the 0 is needed, i.e., that a later part of the cod= e needs=20 the 0. Someone who sees "int i IF_LINT (=3D 0);" should be under no such = illusion. The tradition of hijacking the symbol 'lint' for GCC purposes has been us= ed for=20 many years in several GNU packages. As the problem you mention affects on= ly=20 optionally-generated warnings on non-GNU platforms, I suspect nobody has = cared=20 until now about the issue. Anyway, I changed Emacs master to use the symb= ol=20 GCC_LINT instead; this should avoid the collision in names. Please give i= t a try. The FreeBSD and Cygwin uses of 'lint' violate the C Standard. For example= : #define lint 1 #include _Noreturn int x; This program violates a constraint so the C Standard requires a compile-t= ime=20 diagnostic, but from what you say on FreeBSD and Cygwin the compiler misb= ehaves=20 and silently ignores the _Noreturn. I see that HBBroeker is independently= making=20 a similar point on the Cygwin mailing list=20 .