[Bug c++/33738] -Wtype-limits misses a warning when comparing enums
dnovillo at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Feb 24 16:42:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list