------- Comment #4 from pinskia at gcc dot gnu dot org 2006-04-30 08:04 ------- This patch works for me (I have not fully test it yet though): Index: c-common.c =================================================================== --- c-common.c (revision 113388) +++ c-common.c (working copy) @@ -1080,7 +1080,8 @@ convert_and_check (tree type, tree expr)
/* Do not diagnose overflow in a constant expression merely because a conversion overflowed. */ - TREE_CONSTANT_OVERFLOW (t) = TREE_CONSTANT_OVERFLOW (expr); + if (TREE_CODE (expr) == INTEGER_CST) + TREE_CONSTANT_OVERFLOW (t) = TREE_CONSTANT_OVERFLOW (expr); /* No warning for converting 0x80000000 to int. */ if (!(TYPE_UNSIGNED (type) < TYPE_UNSIGNED (TREE_TYPE (expr)) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27273