aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/lex.c
diff options
context:
space:
mode:
authorAndrew Haley <aph@cygnus.com>1999-02-05 07:58:05 +0000
committerAndrew Haley <aph@gcc.gnu.org>1999-02-05 07:58:05 +0000
commit93089423bd89eda39fa008bb5a03c269049a47f8 (patch)
tree3e784417821635063da49b248b5d28e3eba59f15 /gcc/java/lex.c
parent01235b8090859696a66fbd519d5e6b163a43fbf4 (diff)
downloadgcc-93089423bd89eda39fa008bb5a03c269049a47f8.zip
gcc-93089423bd89eda39fa008bb5a03c269049a47f8.tar.gz
gcc-93089423bd89eda39fa008bb5a03c269049a47f8.tar.bz2
class.c (make_class_data): The superclass of an interface should be null, not class Object.
1999-02-05 Andrew Haley <aph@cygnus.com> * class.c (make_class_data): The superclass of an interface should be null, not class Object. * lex.c (java_lex): Sign extend hex literals. From-SVN: r25039
Diffstat (limited to 'gcc/java/lex.c')
-rw-r--r--gcc/java/lex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index 9984ab9..e1e1074 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -850,11 +850,13 @@ java_lex (java_lval)
/* 2147483648 is valid if operand of a '-'. Otherwise,
2147483647 is the biggest `int' literal that can be
expressed using a 10 radix. For other radixes, everything
- that fits within 32 bits is OK. */
+ that fits within 32 bits is OK. As all literals are
+ signed, we sign extend here. */
int hb = (low >> 31) & 0x1;
if (overflow || high || (hb && low & 0x7fffffff && radix == 10) ||
(hb && !(low & 0x7fffffff) && !ctxp->minus_seen && radix == 10))
JAVA_INTEGRAL_RANGE_ERROR ("Numeric overflow for `int' literal");
+ high = -hb;
}
ctxp->minus_seen = 0;
SET_LVAL_NODE_TYPE (build_int_2 (low, high),