backport fix for PR 82063 to GCC 7 and 8

Joseph Myers joseph@codesourcery.com
Thu Jun 7 22:23:00 GMT 2018


On Thu, 7 Jun 2018, Martin Sebor wrote:

> Though accepting -Wno-no- seems to a general bug in the driver
> for all options that don't specify RejectNegative.  It accepts
> -Wno-no-all as well.  In fact, it seems to accept anything that
> starts with -Wno-, even if it's completely bogus.

No, it's deliberate, so that software can freely use new -Wno- options to 
disable warnings added in new GCC versions without needing autoconf or 
similar tests for whether those options are supported.  *If* there are any 
warnings emitted, that might have been disabled by the -Wno- option, GCC 
warns, but if there are no warnings emitted anyway, the required semantics 
of the -Wno- option have trivially been met.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list