OSDN Git Service

Clarify what happens with an unrecognized -Wno- option
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Apr 2010 12:37:55 +0000 (12:37 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 01:03:14 +0000 (10:03 +0900)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158413 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/doc/invoke.texi

index 8dcba6e..39920a8 100644 (file)
@@ -2807,6 +2807,15 @@ two forms, whichever is not the default.  For further,
 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, for example
+@option{-Wunknwon-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.
+
 @table @gcctabopt
 @item -pedantic
 @opindex pedantic