From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#23640: 25.1.50; Getting rid of compiler warnings Date: Thu, 02 Jun 2016 13:05:09 +0100 Message-ID: References: <574E9E50.6040301@cs.ucla.edu> <2b96b91c-cb05-59a5-0458-05239b26da1b@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464869204 30041 80.91.229.3 (2 Jun 2016 12:06:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2016 12:06:44 +0000 (UTC) To: 23640@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 02 14:06:29 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 1b8ROF-0008Jx-T0 for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 14:06:20 +0200 Original-Received: from localhost ([::1]:46800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8ROE-0002nK-Sf for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 08:06:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8RO3-0002kk-NY for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 08:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8RNy-0007bH-Od for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 08:06:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8RNy-0007bD-L8 for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 08:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b8RNy-00006K-DM for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 08:06:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jun 2016 12:06:02 +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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1464869138357 (code B ref -1); Thu, 02 Jun 2016 12:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Jun 2016 12:05:38 +0000 Original-Received: from localhost ([127.0.0.1]:50530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8RNa-00005h-9v for submit@debbugs.gnu.org; Thu, 02 Jun 2016 08:05:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8RNY-00005U-Q7 for submit@debbugs.gnu.org; Thu, 02 Jun 2016 08:05:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8RNS-0007PI-Mb for submit@debbugs.gnu.org; Thu, 02 Jun 2016 08:05:31 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8RNS-0007Ny-JR for submit@debbugs.gnu.org; Thu, 02 Jun 2016 08:05:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8RNQ-0002Lo-EP for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 08:05:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8RNM-0007LO-6z for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 08:05:27 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:50953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8RNM-0007L9-03 for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 08:05:24 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b8RNK-0007h1-1n for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 14:05:22 +0200 Original-Received: from uk.solarflare.com ([193.34.186.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Jun 2016 14:05:22 +0200 Original-Received: from andrewjmoreton by uk.solarflare.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Jun 2016 14:05:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: uk.solarflare.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (windows-nt) Cancel-Lock: sha1:Xn04tS1jS0nrPpIBjuNlyT8Z9ZE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:118974 Archived-At: On Wed 01 Jun 2016, Paul Eggert wrote: > On 06/01/2016 01:37 PM, Richard Stallman wrote: >> A macro UNUSED_LISP could handle the first. > > Yes, we could have separate macros for each data type requiring syntactically > different initializers. Something like this, say: > > int n UNUSED_0; > Lisp_Object obj UNUSED_Qnil; > > instead of the current: > > int n IF_LINT (= 0); > Lisp_Object obj IF_LINT (= Qnil); > > We could easily change the code in that way. Is it worth the trouble? > >> What is the reason for writing IF_LINT (volatile) >> instead of just volatile? > > Primarily, to tell the reader that the 'volatile' is not needed for > correctness; it's present only to pacify a buggy compiler or lint checker. (In > this case, it pacifies GCC; see GCC bug#54561.) It's basically the same reason > the code uses 'IF_LINT (= 0)' rather than '= 0'. Adding more macros that cruft up the source code to deal with a buggy compiler warning is silly. If the warning is broken and does not operate correctly, then do not enable that warning. AndyM