emacs-devel
[Top][All Lists]
Advanced

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

Re: gl_MANYWARN_ALL_GCC() leads to many spurious warnings


From: Samuel Bronson
Subject: Re: gl_MANYWARN_ALL_GCC() leads to many spurious warnings
Date: Sun, 8 Jul 2012 10:10:59 -0400


On Jul 8, 2012, at 3:32 AM, Paul Eggert wrote:

On 07/07/2012 05:41 PM, Samuel Bronson wrote:
/Users/user/hacking/emacs/src/nsterm.m:5041:5: warning: format not a string literal and no format arguments [-Wformat-security]

I don't grok ObjC well enough to help out much, but it is
possible to disable a bogus warning like that selectively,
as in the following example.

Well, the manual has this to say:

     For Objective-C dialects, `NSString' (or `__NSString__') is
     recognized in the same context.  Declarations including these
     format attributes will be parsed for correct syntax, however the
     result of checking of such format strings is not yet defined, and
     will not be carried out by this version of the compiler.

This leads me to think that GCC should probably just give one warning per file (or called function?) that this value for the attribute isn't yet implemented, and that these warnings should probably never trigger -Werror...

/Users/user/hacking/emacs/lib-src/../src/regex.c:805:0: warning: macro "CHARSET_RANGE_TABLE_BITS" is not used [-Wunused-macros]

That warning should be suppresed by the following line in
regex.c:

#  pragma GCC diagnostic ignored "-Wunused-macros"

Could you investigate why that isn't working for you?
It works for me (GCC 4.7.1).

I don't really know how to go about investigating that, short of building GCC manually (preferably with far less stages of bootstrapping) and running it under GDB. Any ideas?



reply via email to

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