This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH COMMITTED: Ignore fold overflow warnings in tree-vrp.c
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 23 Mar 2007 16:17:06 -0700
- Subject: PATCH COMMITTED: Ignore fold overflow warnings in tree-vrp.c
I just committed this patch to ignore fold overflow warnings in
tree-vrp.c. I'm not sure this case can arise in mainline, but it
arose in 4.2, and may arise in mainline in the future.
Ian
2007-03-23 Ian Lance Taylor <iant@google.com>
* tree-vrp.c (operand_less_p): Ignore fold overflow warnings.
Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c (revision 123166)
+++ gcc/tree-vrp.c (working copy)
@@ -647,7 +647,12 @@ operand_less_p (tree val, tree val2)
{
tree tcmp;
+ fold_defer_overflow_warnings ();
+
tcmp = fold_binary_to_constant (LT_EXPR, boolean_type_node, val, val2);
+
+ fold_undefer_and_ignore_overflow_warnings ();
+
if (!tcmp)
return -2;