From patchwork Sun Aug 15 18:26:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Document handling of unrecognized -Wno- options Date: Sun, 15 Aug 2010 08:26:50 -0000 From: Gerald Pfeifer X-Patchwork-Id: 61754 Message-Id: To: gcc-patches@gcc.gnu.org, Diego Novillo Cc: "Joseph S. Myers" , =?ISO-8859-15?Q?Manuel_L=F3pez-Ib=E1=F1ez?= 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 * 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