4.2 patch committed: turn off invalid overflow warnings

Ian Lance Taylor iant@google.com
Wed Mar 14 09:19:00 GMT 2007


I have to apologize.  I didn't realize that the 4.2 branch built
without -Werror by default.  I missed the fact that it was generating
some invalid warnings during bootstrap.  This is due to some code
in tree-vrp.c which is different between mainline and 4.2.

I just committed this patch to the 4.2 branch to fix the problem.
Tested with  bootstrap and testsuite run on i686-pc-linux-gnu.

Sorry about that.

Ian


2007-03-14  Ian Lance Taylor  <iant@google.com>

	* tree-vrp.c (value_inside_range): Ignore fold warnings.


Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c	(revision 122899)
+++ gcc/tree-vrp.c	(working copy)
@@ -843,11 +843,19 @@ value_inside_range (tree val, value_rang
 {
   tree cmp1, cmp2;
 
+  fold_defer_overflow_warnings ();
+
   cmp1 = fold_binary_to_constant (GE_EXPR, boolean_type_node, val, vr->min);
   if (!cmp1)
+  {
+    fold_undefer_and_ignore_overflow_warnings ();
     return -2;
+  }
 
   cmp2 = fold_binary_to_constant (LE_EXPR, boolean_type_node, val, vr->max);
+
+  fold_undefer_and_ignore_overflow_warnings ();
+
   if (!cmp2)
     return -2;
 



More information about the Gcc-patches mailing list