projects
/
platform
/
upstream
/
linaro-gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26717e4
)
(yylex): Warn about integers so large that they are unsigned.
author
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Sep 1992 18:45:50 +0000
(18:45 +0000)
committer
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Sep 1992 18:45:50 +0000
(18:45 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2120
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/c-lex.c
patch
|
blob
|
history
diff --git
a/gcc/c-lex.c
b/gcc/c-lex.c
index
629e93b
..
0546150
100644
(file)
--- a/
gcc/c-lex.c
+++ b/
gcc/c-lex.c
@@
-1585,6
+1585,9
@@
yylex ()
&& !warn)
pedwarn ("integer constant out of range");
+ if (base == 10 && ! spec_unsigned && TREE_UNSIGNED (type))
+ warning ("integer constant is so large that it is unsigned");
+
if (flag_traditional && !int_fits_type_p (yylval.ttype, type))
/* The traditional constant 0x80000000 is signed
but doesn't fit in the range of int.