aboutsummaryrefslogtreecommitdiff
path: root/gcc/common.opt
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2008-02-24 11:40:32 -0500
committerDiego Novillo <dnovillo@gcc.gnu.org>2008-02-24 11:40:32 -0500
commitfaebccf9b6ec3f4bfdcc268fc55cf58c397bed6c (patch)
tree771c35c481fdb2bb880ce72ab481848d5c8a4fa6 /gcc/common.opt
parent88c7f01b6c31f28392eacfda320c90835a50199a (diff)
downloadgcc-faebccf9b6ec3f4bfdcc268fc55cf58c397bed6c.zip
gcc-faebccf9b6ec3f4bfdcc268fc55cf58c397bed6c.tar.gz
gcc-faebccf9b6ec3f4bfdcc268fc55cf58c397bed6c.tar.bz2
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. From-SVN: r132591
Diffstat (limited to 'gcc/common.opt')
-rw-r--r--gcc/common.opt4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index ea48ba7..3a64d2a 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -193,6 +193,10 @@ Wsystem-headers
Common Var(warn_system_headers) Warning
Do not suppress warnings from system headers
+Wtype-limits
+Common Var(warn_type_limits) Init(-1) Warning
+Warn if a comparison is always true or always false due to the limited range of the data type
+
Wuninitialized
Common Var(warn_uninitialized) Warning
Warn about uninitialized automatic variables