(convert_and_check): Don't diagnose overflow in constant expression
merely because conversion overflowed. From-SVN: r9626
This commit is contained in:
parent
5be1df77c9
commit
868fc7506b
|
@ -1369,6 +1369,10 @@ convert_and_check (type, expr)
|
||||||
{
|
{
|
||||||
TREE_OVERFLOW (t) = 0;
|
TREE_OVERFLOW (t) = 0;
|
||||||
|
|
||||||
|
/* Do not diagnose overflow in a constant expression merely
|
||||||
|
because a conversion overflowed. */
|
||||||
|
TREE_CONSTANT_OVERFLOW (t) = TREE_CONSTANT_OVERFLOW (expr);
|
||||||
|
|
||||||
/* No warning for converting 0x80000000 to int. */
|
/* No warning for converting 0x80000000 to int. */
|
||||||
if (!(TREE_UNSIGNED (type) < TREE_UNSIGNED (TREE_TYPE (expr))
|
if (!(TREE_UNSIGNED (type) < TREE_UNSIGNED (TREE_TYPE (expr))
|
||||||
&& TREE_CODE (TREE_TYPE (expr)) == INTEGER_TYPE
|
&& TREE_CODE (TREE_TYPE (expr)) == INTEGER_TYPE
|
||||||
|
|
Loading…
Reference in New Issue