------- Comment #6 from pinskia at gcc dot gnu dot org 2007-07-06 04:12 ------- This patch is most likely better: Index: fold-const.c =================================================================== --- fold-const.c (revision 126396) +++ fold-const.c (working copy) @@ -2063,9 +2063,7 @@ appropriately sign-extended or truncated. */ t = force_fit_type_double (type, TREE_INT_CST_LOW (arg1), TREE_INT_CST_HIGH (arg1), - /* Don't set the overflow when - converting a pointer */ - !POINTER_TYPE_P (TREE_TYPE (arg1)), + 0, (TREE_INT_CST_HIGH (arg1) < 0 && (TYPE_UNSIGNED (type) < TYPE_UNSIGNED (TREE_TYPE (arg1))))
So don't set overflow for conversion. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32628