diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-27 14:59:53 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-27 14:59:53 +0000 |
commit | 7c13dce4b1799210bb26913109a25a4ebd9bc6e9 (patch) | |
tree | 84a5efdf2524b5d4d60576bac68ba49309e5a146 /gcc/c.opt | |
parent | 7528fb139a8f151dd8565eb5372fdf9e9c133e3a (diff) | |
download | gcc-7c13dce4b1799210bb26913109a25a4ebd9bc6e9.tar.gz |
Fix c++/27975.
* c.opt (Wenum-compare): New warning option.
* doc/invoke.texi (Warning Options): Document -Wenum-compare.
cp/
* call.c (build_new_op): Make warning conditional on OPT_Wenum_compare.
testsuite/
* g++.dg/warn/Wenum-compare.C: New testcase.
* g++.dg/warn/Wenum-compare-no.C: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136035 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c.opt')
-rw-r--r-- | gcc/c.opt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c.opt b/gcc/c.opt index 18ce852dc86..9669f2ca6ba 100644 --- a/gcc/c.opt +++ b/gcc/c.opt @@ -195,6 +195,10 @@ Wendif-labels C ObjC C++ ObjC++ Warning Warn about stray tokens after #elif and #endif +Wenum-compare +C++ ObjC++ Var(warn_enum_compare) Init(1) Warning +Warn about comparison of different enum types + Werror C ObjC C++ ObjC++ ; Documented in common.opt |