Eric Blake <ebl...@redhat.com> writes: > I've just found another problem with the manywarnings module: > > gcc 4.6.2 handles -Wabi and -Wdeprecated just fine for C code (I don't > know if it is silently ignored, or if it could actually trigger); but > gcc 4.2.1 (as shipped on FreeBSD) complains: > > cc1: warning: command line option "-Wabi" is valid for C++/ObjC++ but > not for C > cc1: warning: command line option "-Wdeprecated" is valid for C++/ObjC++ > but not for C > > on every single compilation run. Is there a way to improve the module > so that these warnings are not added to the command line when dealing > with older (noisier) gcc?
Did you run it through gl_WARN_ADD? I wonder if we could use -Werror? However AC_LANG_PROGRAM and -Werror are often incompatible... We could look to see if -Wabi and -Wdeprecated really does anything in gcc 4.6.x for C. If it doesn't, let's remove it. They are not mentioned in the manual. /Simon