Hey, On Wed, Aug 14, 2013 at 05:33:07PM -0600, Eric Blake wrote: > As reported by Christophe Fergeau and others, use of the > warnings modules is awkward when probing for negative > warning flags. For example, clang recognizes > -Wno-unused-command-line-argument, but gcc does not; > gcc silently ignores unknown warnings in isolation, but when > something else also causes a compilation problem, gcc then > compounds the overall message by also complaining about the > unrecongized command line option at that time. The gcc manual > documents that this behavior is intentional so that someone > can add a -Wno-foo silencer to CFLAGS for a warning that older > gcc does not understand, and where the warning is undesired > under newer gcc; it also documents that probing for the -Wfoo > positive form of the error is a reliable way to tell if the > negative form will actually suppress anything. Clang will > warn for both positive and negative forms of an unknown > option. > > * m4/warnings.m4 (gl_COMPILER_OPTION_IF): If name begins with > -Wno-, test if the compiler recognizes the positive form instead.
I've tested this patch with the module that led me to report this issue (spice-gtk + RHEL6) and the warnings about unsupported -Wno-xxx flags are now gone. Thanks! Christophe
pgpojMcSuQcMH.pgp
Description: PGP signature