Re: [PATCH] warnings: check -Wfoo rather than -Wno-foo

2013-08-14 Thread Eric Blake
On 08/14/2013 05:49 PM, Paul Eggert wrote: > Eric Blake wrote: > >> - gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $gl_unknown_warnings_are_errors >> $1"]) >> + gl_AS_VAR_APPEND(m4_defn([gl_Flags]), >> +[" $gl_unknown_warnings_are_errors ]m4_bpatsubst([$1], [^-Wno-], >> [-W])["]) > > This ass

Re: [PATCH] warnings: check -Wfoo rather than -Wno-foo

2013-08-14 Thread Paul Eggert
Eric Blake wrote: > - gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $gl_unknown_warnings_are_errors > $1"]) > + gl_AS_VAR_APPEND(m4_defn([gl_Flags]), > +[" $gl_unknown_warnings_are_errors ]m4_bpatsubst([$1], [^-Wno-], > [-W])["]) This assumes that gl_COMPILER_OPTION_IF's argument is a constant

[PATCH] warnings: check -Wfoo rather than -Wno-foo

2013-08-14 Thread Eric Blake
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

Re: gl_WARN_ADD does not work with -Wno-xxxx warnings

2013-08-14 Thread Christophe Fergeau
On Wed, Aug 14, 2013 at 06:29:14AM -0600, Eric Blake wrote: > On 08/14/2013 01:58 AM, Christophe Fergeau wrote: > > Hi, > > > > gcc handling of -Wno- flags is different from its handling of -W > > flags as described in > > http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Warning-Options.html#Wa

Re: gl_WARN_ADD does not work with -Wno-xxxx warnings

2013-08-14 Thread Eric Blake
On 08/14/2013 01:58 AM, Christophe Fergeau wrote: > Hi, > > gcc handling of -Wno- flags is different from its handling of -W > flags as described in > http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Warning-Options.html#Warning-Options > : > > "When an unrecognized warning option is requested

gl_WARN_ADD does not work with -Wno-xxxx warnings

2013-08-14 Thread Christophe Fergeau
Hi, gcc handling of -Wno- flags is different from its handling of -W flags as described in http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Warning-Options.html#Warning-Options : "When an unrecognized warning option is requested (e.g., -Wunknown-warning), GCC emits a diagnostic stating that th