This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR 28322 unknown -Wno-* options should cause warnings, not errors
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Peter Maydell <pmaydell+gcc at chiark dot greenend dot org dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 3 Jun 2008 23:37:16 +0200
- Subject: Re: [PATCH] PR 28322 unknown -Wno-* options should cause warnings, not errors
- References: <E1K3dsP-0004cH-Kn@mnementh.archaic.org.uk>
Hello, and apologies for chiming in at what doesn't seem like a good
time for this,
* Peter Maydell wrote on Tue, Jun 03, 2008 at 11:17:05PM CEST:
>
> This patch fixes a problem with the initial fix for PR 28322 (which
> suppresses messages about unknown -Wno-* options unless some other
> diagnostic is being emitted). The aim was that an unsupported -Wno-*
> option should never change whether the compilation succeeds or fails
> (whether with or without -Werror);
So there is actually no clean way to write an Autoconf macro to find out
if a -Wno-* option is supported or not? IOW, a configure test must try
to parse the warning output from GCC in order to avoid that users
complain about lots of warnings during a build?
What a mess!
Did GCC at least standardize on a warning message easily and
unmistakenly detectable using a glob or so; or is there also a
-Wdo-not-warn-about-unknown-Wno-warning-flags? (Even if there
were, how would I be able to test for it without ugliness...)
Thanks,
Ralf