aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@gcc.gnu.org>2010-04-16 08:37:55 -0400
committerDiego Novillo <dnovillo@gcc.gnu.org>2010-04-16 08:37:55 -0400
commite54655a20e4f53e6a723deb09d5a5a36c315f2b3 (patch)
tree79d1cfccf8ff726bc9ea0039b745a830c0e448b7 /gcc/doc
parent68a3eb69b12f7385ed0696ecf696a4ee47f61619 (diff)
downloadgcc-e54655a20e4f53e6a723deb09d5a5a36c315f2b3.zip
gcc-e54655a20e4f53e6a723deb09d5a5a36c315f2b3.tar.gz
gcc-e54655a20e4f53e6a723deb09d5a5a36c315f2b3.tar.bz2
Clarify what happens with an unrecognized -Wno- option
From-SVN: r158413
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 8dcba6e..39920a8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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