This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH COMMITTED: Fix overflow warning message in fold-const


One of the overflow warnings in fold-const.c incorrectly said that it
folded to true when it really folds to false.  Fixed by the appended
patch.  Bootstrapped and tested on i686-pc-linux-gnu.

Ian


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

	* fold-const.c (fold_binary): Correct warning for X - c >= X.


Index: fold-const.c
===================================================================
--- fold-const.c	(revision 123166)
+++ fold-const.c	(working copy)
@@ -11802,7 +11802,7 @@ fold_binary (enum tree_code code, tree t
 		  if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg1)))
 		    fold_overflow_warning (("assuming signed overflow does "
 					    "not occur when assuming that "
-					    "(X - c) >= X is always true"),
+					    "(X - c) >= X is always false"),
 					   WARN_STRICT_OVERFLOW_ALL);
 		  return constant_boolean_node (0, type);
 		}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]