Odd warning on wide char compare
Josh Boyer
jwboyer@gmail.com
Tue Dec 15 13:15:00 GMT 2009
On Tue, Dec 15, 2009 at 12:17:04AM +0100, Andi Hellmund wrote:
>Hey Josh,
>
>you don't see any warnings because gcc suppresses warning messages for
>system headers due to "the assumption that they usually do not indicate real
>problems and would only make the compiler output harder to read." [taken
>from man gcc --> -Wsystem-headers]. You could also see that in the
>preprocessed file *.i by looking at those lines:
>
># 297 "/usr/include/wchar.h" 3 4
>
>This number "3" tells the compiler (including preprocessor) to not emit
>warnings for system headers (a full listing of flags for the # <line>
><function> <flags> directive could be found in the CPP user manual,
>chapter 9 "preprocessor output")
Ah! I don't feel so stupid now (though I probably should have looked
harder to begin with). Thank you for the explanation.
>Though, from my understanding of the man page option -Wsystem-headers,
>after enabling this, you should get the warnings for system headers, but
>I wasn't able to get them printed with my quite recent version of gcc. :-)
I didn't get the warning using -Wsystem-headers on gcc 4.3 or 4.4 either,
but I'm not exactly panicing about it :).
josh
More information about the Gcc-help
mailing list