emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with --enable-gcc-warnings


From: Eli Zaretskii
Subject: Problems with --enable-gcc-warnings
Date: Tue, 17 Dec 2013 19:57:52 +0200

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]