diff options
author | Andrew Cagney <ac131313@redhat.com> | 2002-03-26 15:36:37 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@gcc.gnu.org> | 2002-03-26 15:36:37 +0000 |
commit | 173028e5ab8009adf8df8c023ed7a9d71328fe3d (patch) | |
tree | 94846cf8b81e58eaebeff467b95dc20837930bef /gcc/doc | |
parent | e14365a7382302adc4144d493bbbb28275e467fc (diff) | |
download | gcc-173028e5ab8009adf8df8c023ed7a9d71328fe3d.zip gcc-173028e5ab8009adf8df8c023ed7a9d71328fe3d.tar.gz gcc-173028e5ab8009adf8df8c023ed7a9d71328fe3d.tar.bz2 |
Add -Wswitch-enum. Document.
Fix PR c/5044.
From-SVN: r51386
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 321cda2..8f51f29 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -228,8 +228,8 @@ in the following sections. -Wno-import -Wpacked -Wpadded @gol -Wparentheses -Wpointer-arith -Wredundant-decls @gol -Wreturn-type -Wsequence-point -Wshadow @gol --Wsign-compare -Wswitch -Wswitch-default -Wsystem-headers @gol --Wtrigraphs -Wundef -Wuninitialized @gol +-Wsign-compare -Wswitch -Wswitch-default -Wswitch-enum @gol +-Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol -Wunknown-pragmas -Wunreachable-code @gol -Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol -Wunused-value -Wunused-variable -Wwrite-strings} @@ -2039,6 +2039,13 @@ provoke warnings when this option is used. Warn whenever a @code{switch} statement does not have a @code{default} case. +@item -Wswitch-enum +@opindex Wswitch-enum +Warn whenever a @code{switch} statement has an index of enumeral type +and lacks a @code{case} for one or more of the named codes of that +enumeration. @code{case} labels outside the enumeration range also +provoke warnings when this option is used. + @item -Wtrigraphs @opindex Wtrigraphs Warn if any trigraphs are encountered that might change the meaning of |