|
From: | Samuel Bronson |
Subject: | Re: gl_MANYWARN_ALL_GCC() leads to many spurious warnings |
Date: | Tue, 10 Jul 2012 14:07:10 -0400 |
On Jul 9, 2012, at 11:23 AM, Samuel Bronson wrote:
On Jul 8, 2012, at 10:15 PM, Paul Eggert wrote:On 07/08/2012 07:10 AM, Samuel Bronson wrote:I don't really know how to go about investigating that, short of building GCC manuallyI wasn't thinking of anything that drastic -- just compile with gcc -E instead of gcc -c and look to see what happened to the pragmas, something like that. I just now tried with stock Ubuntu 12.04, i.e., gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, with its bundled GNUstep libraries, and did not observe either the regex.c -Wunused-macros warnings or the -Wformat-security warnings. So this is not merely a GCC 4.7.1 issue, for whatever that's worth. I did see a passle of other warnings. Perhaps the warnings that you're observing come up only after you fix the ones I saw?Hmm. I'm beginning to suspect that the regex.c warnings are somehow related to my use of ccache...
Well, I was right; it was related to my use of ccache. But it's still a GCC bug; gcc -E isn't honoring #pragma diagnostic ignored "-Wunused- macros", and since ccache defaults to running the preprocessor first, then compiling its output (so it can skip the compilation if it already has results cached for that preprocessor output), this causes ccache to output the bogus warnings. I reported this as <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53920 >.
Presumably, the reason that you don't get the format warnings with GNUstep because, since only Apple's compilers have full support for __attribute__((format(NSString,...)), GNUstep probably doesn't use this attribute in its prototype for NSLog. I submitted a bug report about them at <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53905>.
[Prev in Thread] | Current Thread | [Next in Thread] |