This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33738] -Wtype-limits misses a warning when comparing enums
- From: "dnovillo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Feb 2008 16:41:22 -0000
- Subject: [Bug c++/33738] -Wtype-limits misses a warning when comparing enums
- References: <bug-33738-91@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from dnovillo at gcc dot gnu dot org 2008-02-24 16:41 -------
Subject: Bug 33738
Author: dnovillo
Date: Sun Feb 24 16:40:32 2008
New Revision: 132591
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132591
Log:
http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01094.html
PR 33738
* tree-vrp.c (vrp_evaluate_conditional): With
-Wtype-limits, emit a warning when comparing against a
constant outside the natural range of OP0's type.
* c.opt (Wtype-limits): Move ...
* common.opt (Wtype-limits): ... here.
testsuite/ChangeLog
PR 33738
* g++.dg/warn/pr33738.C: New.
Added:
trunk/gcc/testsuite/g++.dg/warn/pr33738.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c.opt
trunk/gcc/common.opt
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33738