Re: [PATCH] warnings: extend -Wno-foo handling to work through shell vars

2013-08-15 Thread Eric Blake
On 08/15/2013 01:39 PM, Paul Eggert wrote: > Eric Blake wrote: >> + -Wno-*) gl_positive=`echo ".$gl_positive" | sed 's/^.//; s/^-Wno-/-W/'`;; > > This should use expr, e.g., > > gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.)\)'` Indeed a slightly more efficient expression. Pushed as a foll

Re: [PATCH] warnings: extend -Wno-foo handling to work through shell vars

2013-08-15 Thread Paul Eggert
Eric Blake wrote: > + -Wno-*) gl_positive=`echo ".$gl_positive" | sed 's/^.//; s/^-Wno-/-W/'`;; This should use expr, e.g., gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.)\)'`

Re: [PATCH] warnings: extend -Wno-foo handling to work through shell vars

2013-08-15 Thread Eric Blake
On 08/15/2013 01:24 PM, Eric Blake wrote: > Reported by Paul Eggert. Common usage is to do: > > for w in $list; do > gl_WARN_ADD([$w]) > done > > which means we have to be polymorphic to shell code (similar to > how AS_VAR_SET is polymorphic). > > * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Mak

[PATCH] warnings: extend -Wno-foo handling to work through shell vars

2013-08-15 Thread Eric Blake
Reported by Paul Eggert. Common usage is to do: for w in $list; do gl_WARN_ADD([$w]) done which means we have to be polymorphic to shell code (similar to how AS_VAR_SET is polymorphic). * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Make polymorphic. Signed-off-by: Eric Blake --- ChangeLog