aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
authorDJ Delorie <dj@gcc.gnu.org>2006-01-18 15:02:42 -0500
committerDJ Delorie <dj@gcc.gnu.org>2006-01-18 15:02:42 -0500
commit79cf599406a6a51e2fdd47810fdba89e04cbf1cc (patch)
treefc2b70d94a779eb0814d5f4a6c95145347b94e16 /gcc/doc/invoke.texi
parentf9fe7aed71e486669af301c0beb0c58bc303ee39 (diff)
downloadgcc-79cf599406a6a51e2fdd47810fdba89e04cbf1cc.zip
gcc-79cf599406a6a51e2fdd47810fdba89e04cbf1cc.tar.gz
gcc-79cf599406a6a51e2fdd47810fdba89e04cbf1cc.tar.bz2
c-pragma.c (handle_pragma_diagnostic): New.
* c-pragma.c (handle_pragma_diagnostic): New. (init_pragma): Register it. * doc/extend.texi: Document it. * diagnostic.def: Add DK_UNSPECIFIED and DK_IGNORED. * diagnostic.h (diagnostic_classify_diagnostic): Declare. (diagnostic_context): Add classify_diagnostic[]. * diagnostic.c (diagnostic_count_diagnostic): Don't count warnings as errors if they're overridden to DK_WARNING. (diagnostic_initialize): Initialize classify_diagnostic[]. (diagnostic_set_kind_override): New. (diagnostic_report_diagnostic): Check for kind changes. * opts.c (common_handle_option): Take lang_mask. Update callers. Handle OPT_Werror_. * common.opt (Werror=): New. * doc/invoke.texi: Document -Werror=* From-SVN: r109907
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r--gcc/doc/invoke.texi20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 629e4a9..924c121 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1,5 +1,5 @@
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-@c 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+@c 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -226,7 +226,7 @@ Objective-C and Objective-C++ Dialects}.
-Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol
-Wconversion -Wno-deprecated-declarations @gol
-Wdisabled-optimization -Wno-div-by-zero -Wno-endif-labels @gol
--Werror -Werror-implicit-function-declaration @gol
+-Werror -Werror-* -Werror-implicit-function-declaration @gol
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-extra-args -Wformat-nonliteral @gol
-Wformat-security -Wformat-y2k @gol
@@ -3411,6 +3411,22 @@ This option is only supported for C and Objective-C@.
@opindex Werror
Make all warnings into errors.
+@item -Werror=
+@opindex Werror=
+Make the specified warning into an errors. The specifier for a
+warning is appended, for example @option{-Werror=switch} turns the
+warnings controlled by @option{-Wswitch} into errors. This switch
+takes a negative form, to be used to negate @option{-Werror} for
+specific warnings, for example @option{-Wno-error=switch} makes
+@option{-Wswitch} warnings not be errors, even when @option{-Werror}
+is in effect. You can use the @option{-fdiagnostics-show-option}
+option to have each controllable warning amended with the option which
+controls it, to determine what to use with this option.
+
+Note that specifying @option{-Werror=}@var{foo} automatically implies
+@option{-W}@var{foo}. However, @option{-Wno-error=}@var{foo} does not
+imply anything.
+
@item -Wstack-protector
@opindex Wstack-protector
This option is only active when @option{-fstack-protector} is active. It