From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: gl_MANYWARN_ALL_GCC() leads to many spurious warnings Date: Sat, 07 Jul 2012 12:53:49 -0700 Organization: UCLA Computer Science Department Message-ID: <4FF893CD.2050403@cs.ucla.edu> References: <4FF75B71.3040607@cs.ucla.edu> <707B3485-91B3-4420-888A-A02416D2D1C7@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341690843 31328 80.91.229.3 (7 Jul 2012 19:54:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2012 19:54:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Samuel Bronson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 07 21:54:03 2012 Return-path: Envelope-to: ged-emacs-devel@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 1Snb4p-0005VH-56 for ged-emacs-devel@m.gmane.org; Sat, 07 Jul 2012 21:53:59 +0200 Original-Received: from localhost ([::1]:40746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Snb4o-00024K-4g for ged-emacs-devel@m.gmane.org; Sat, 07 Jul 2012 15:53:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Snb4k-00024F-Lt for emacs-devel@gnu.org; Sat, 07 Jul 2012 15:53:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Snb4i-0003bc-Sj for emacs-devel@gnu.org; Sat, 07 Jul 2012 15:53:54 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:52819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Snb4i-0003bS-Kq for emacs-devel@gnu.org; Sat, 07 Jul 2012 15:53:52 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 4234FA60003; Sat, 7 Jul 2012 12:53:49 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zw0UAYc6cjPL; Sat, 7 Jul 2012 12:53:48 -0700 (PDT) Original-Received: from [192.168.1.4] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id BC71FA60001; Sat, 7 Jul 2012 12:53:48 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 In-Reply-To: <707B3485-91B3-4420-888A-A02416D2D1C7@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151484 Archived-At: On 07/06/2012 03:38 PM, Samuel Bronson wrote: > why does it use flags like -Wunreachable-code (which was so buggy > that it eventually got yanked -- it's now silently ignored) The big picture is that --enable-gcc-warnings hasn't been ironed out --with-ns. This can be fixed, and I expect it will find a few real bugs along with many things that are just nit cleanups, but it'll take some work. Is this something you'd like to help out with? It could be combined with the idea of maintaining another configure-time option useful for finding bugs on Apple. I started on this task, checking in the results in trunk bzr 108941, but there's lots more where that came from and to be honest I don't understand the --with-ns code that well. I did see some unused-macro warnings but they seemed correct to me -- perhaps I am missing something? Anyway, you can look at the diffs in 108941 to see how to go about this, and/or to let me know what I did wrong. Anyway, to get back to your question, I suspect -Wunreachable-code was there because it is harmless with the latest GCC, so nobody bothered to remove it. Since this flag doesn't ever help I removed it in trunk bzr 108941. > and -Wsync-nand (which is totally irrelevant, and warns that this > warning isn't allowed for Objective C code) Same thing -- this flag never bothered anybody in the --without-ns world. Since it never helps either, I removed it too. > and -Wunused-macros (which seems rather buggy in GCC 4.7.1 -- it > doesn't seem to count appearing in an #ifdef as a use?). I don't observe a bug here. The following program compiles just fine with GCC 4.7.1, with -Wunused-macros. (This is on Fedora 15 x86-64.) #define FOO bar #ifdef FOO int main (void) { return 0; } #endif What bug do you see?