aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorAndrew Cagney <ac131313@redhat.com>2002-03-23 16:33:44 +0000
committerAndrew Cagney <cagney@gcc.gnu.org>2002-03-23 16:33:44 +0000
commitd6961341dd0ef37d0c292d25f7e428a42e22b0c0 (patch)
tree40bde56f3c0f0b034afa8251d7b684434a00dddd /gcc/doc
parentc677cd7f47af8d4c2ebc387e4a1d49321bb660a6 (diff)
downloadgcc-d6961341dd0ef37d0c292d25f7e428a42e22b0c0.zip
gcc-d6961341dd0ef37d0c292d25f7e428a42e22b0c0.tar.gz
gcc-d6961341dd0ef37d0c292d25f7e428a42e22b0c0.tar.bz2
[multiple changes]
2002-03-23 Andrew Cagney <ac131313@redhat.com> * doc/invoke.texi (Option Summary): Mention -Wswitch-default. (Warning Options): Document -Wswitch-default. * toplev.c (W_options): Add -Wswitch-default. Update comment on -Wswitch. (warn_switch_default): Define variable. (warn_switch): Update comment. * flags.h (warn_switch_default): Declare variable. (warn_switch): Update comment. * stmt.c (expand_end_case): Check for and, when warn_switch_no_default, warn of a missing default case. Index: f/ChangeLog Sat Mar 23 11:18:17 2002 Andrew Cagney <ac131313@redhat.com> * invoke.texi (Warning Options): Mention -Wswitch-default. Index: testsuite/ChangeLog 2002-03-23 Andrew Cagney <ac131313@redhat.com> * gcc.dg/Wswitch-default.c: New test. From-SVN: r51238
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 7e6b714..321cda2 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -228,7 +228,7 @@ in the following sections.
-Wno-import -Wpacked -Wpadded @gol
-Wparentheses -Wpointer-arith -Wredundant-decls @gol
-Wreturn-type -Wsequence-point -Wshadow @gol
--Wsign-compare -Wswitch -Wsystem-headers @gol
+-Wsign-compare -Wswitch -Wswitch-default -Wsystem-headers @gol
-Wtrigraphs -Wundef -Wuninitialized @gol
-Wunknown-pragmas -Wunreachable-code @gol
-Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
@@ -2034,6 +2034,11 @@ enumeration. (The presence of a @code{default} label prevents this
warning.) @code{case} labels outside the enumeration range also
provoke warnings when this option is used.
+@item -Wswitch-default
+@opindex Wswitch-switch
+Warn whenever a @code{switch} statement does not have a @code{default}
+case.
+
@item -Wtrigraphs
@opindex Wtrigraphs
Warn if any trigraphs are encountered that might change the meaning of