http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51388
--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-12-02 16:59:30 UTC --- (In reply to comment #5) > On Fri, 2 Dec 2011, rguenth at gcc dot gnu.org wrote: > > > Still the behavior of warning for -Wno- changed appearantly. Joseph? > > The idea was that if an unknown -Wno- option is passed, but there were no > warnings, it doesn't matter that we don't know what warnings the -Wno- > option might have been intended to disable because there were no warnings > at all for it to disable - so diagnosis of unknown -Wno- options is > deferred and they are only diagnosed if some other warning (that the > unknown option might potentially have been intended to disable) is given. That is right. This was requested precisely by Debian GCC maintainers. In fact, clang seems to follow gcc now, except that they only warn (instead of error) for unknown positive options: manuel@gcc12:~$ ~/bin/clang++ pr42356.cc -Wwhatever warning: unknown warning option '-Wwhatever' [-Wunknown-warning-option] In any case, how is it -Wno-long-long tested by configure? I guess configure could test whether "-Wnarrowing -Wno-narrowing" is accepted, or test with a testcase that triggers a default warning like "1/0".