This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Document handling of unrecognized -Wno- options
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at google dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Date: Sun, 15 Aug 2010 20:26:50 +0200 (CEST)
- Subject: Re: [patch] Document handling of unrecognized -Wno- options
- References: <20100415165012.GA17409@google.com>
On Thu, 15 Apr 2010, Diego Novillo wrote:
> +When an unrecognized warning label is requested (e.g.,
> +@option{-Wunknown-warning}), GCC will emit a diagnostic stating
> +that the option is not recognized. However, if the @samp{-Wno-} form
> +is used, the behavior is slightly different: No diagnostic will be
> +produced for @option{-Wno-unknown-warning} unless other diagnostics
> +are being produced. This allows the use of new @option{-Wno-} options
> +with old compilers, but if something goes wrong, the compiler will
> +warn that an unrecognized option was used.
I noticed that the committed patch has "warning label", not "warning
option" so it looks like you committed the older version of the patch
without this change, Diego? (Cf.
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00905.html)
Also, I changed @samp to @option in one instance to be consistent.
Installed.
Gerald
2010-08-15 Gerald Pfeifer <gerald@pfeifer.com>
* doc/invoke.texi (Warning Options): Fix terminology and markup
in the description of how unknown warning options are handled.
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi (revision 163027)
+++ doc/invoke.texi (working copy)
@@ -2863,9 +2863,9 @@
language-specific options also refer to @ref{C++ Dialect Options} and
@ref{Objective-C and Objective-C++ Dialect Options}.
-When an unrecognized warning label is requested (e.g.,
+When an unrecognized warning option is requested (e.g.,
@option{-Wunknown-warning}), GCC will emit a diagnostic stating
-that the option is not recognized. However, if the @samp{-Wno-} form
+that the option is not recognized. However, if the @option{-Wno-} form
is used, the behavior is slightly different: No diagnostic will be
produced for @option{-Wno-unknown-warning} unless other diagnostics
are being produced. This allows the use of new @option{-Wno-} options