projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bd23d2
)
(yylex): If integer value overflows so highword is negative,
author
Richard Stallman
<rms@gnu.org>
Sat, 12 Sep 1992 19:08:12 +0000
(19:08 +0000)
committer
Richard Stallman
<rms@gnu.org>
Sat, 12 Sep 1992 19:08:12 +0000
(19:08 +0000)
it needs unsigned long long.
From-SVN: r2111
gcc/c-lex.c
patch
|
blob
|
history
diff --git
a/gcc/c-lex.c
b/gcc/c-lex.c
index
1587ae6
..
629e93b
100644
(file)
--- a/
gcc/c-lex.c
+++ b/
gcc/c-lex.c
@@
-1558,6
+1558,8
@@
yylex ()
else if (! spec_long_long)
ansi_type = long_unsigned_type_node;
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,
long_long_integer_type_node))
ansi_type = long_long_integer_type_node;