From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Problems with --enable-gcc-warnings Date: Tue, 17 Dec 2013 19:57:52 +0200 Message-ID: <83ppovcqcf.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1387303072 16677 80.91.229.3 (17 Dec 2013 17:57:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Dec 2013 17:57:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 17 18:57:58 2013 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 1Vsyu6-0005Wr-9t for ged-emacs-devel@m.gmane.org; Tue, 17 Dec 2013 18:57:58 +0100 Original-Received: from localhost ([::1]:34783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsyu5-0003HA-WD for ged-emacs-devel@m.gmane.org; Tue, 17 Dec 2013 12:57:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsytx-0003BZ-6n for emacs-devel@gnu.org; Tue, 17 Dec 2013 12:57:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vsytp-0001c4-LH for emacs-devel@gnu.org; Tue, 17 Dec 2013 12:57:49 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:47331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsytp-0001ZK-D5 for emacs-devel@gnu.org; Tue, 17 Dec 2013 12:57:41 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MXY00500PSGNO00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Tue, 17 Dec 2013 19:57:39 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MXY005BNPW3K740@a-mtaout21.012.net.il>; Tue, 17 Dec 2013 19:57:39 +0200 (IST) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:166554 Archived-At: I tried that option in several systems and saw a few problems I thought I should mention here. First, it seems like older compilers have trouble with some of the warning options. On one system, which has GCC 3.4, I see this: cc1.exe: warning: command line option "-Wabi" is valid for C++/ObjC++ but not for C cc1.exe: warning: command line option "-Wdeprecated" is valid for C++/Java/ObjC++ but not for C On another system, which has GCC 4.4 (fencepost.gnu.org), I see this: cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++ but not for C If these options are not universally supported, why doesn't configure make some real test, and avoid using those if they are not supported for C programs? Alternatively, if these warnings are not supposed to be turned on unless GCC is of some relatively new version, why isn't that being tested? Then I had a warning in lib/file-has-acl.c, because under some conditions the acl_access_nontrivial doesn't return a value (look near its end). Lastly, the INT_BUFSIZE_BOUND macro seems to be unable to support 'void *' as its argument without emitting warnings, I need to use intptr_t instead to pacify the compiler. Thanks.