Commit a120b788 by Richard Stallman

(yylex): If integer value overflows so highword is negative,

it needs unsigned long long.

From-SVN: r2111
parent 9bd23d2c
...@@ -1558,6 +1558,8 @@ yylex () ...@@ -1558,6 +1558,8 @@ yylex ()
else if (! spec_long_long) else if (! spec_long_long)
ansi_type = long_unsigned_type_node; ansi_type = long_unsigned_type_node;
else if (! spec_unsigned else if (! spec_unsigned
/* Verify value does not overflow into sign bit. */
&& TREE_INT_CST_HIGH (yylval.ttype) >= 0
&& int_fits_type_p (yylval.ttype, && int_fits_type_p (yylval.ttype,
long_long_integer_type_node)) long_long_integer_type_node))
ansi_type = long_long_integer_type_node; ansi_type = long_long_integer_type_node;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment