]> gcc.gnu.org Git - gcc.git/commitdiff
class.c (make_class_data): The superclass of an interface should be null, not class...
authorAndrew Haley <aph@cygnus.com>
Fri, 5 Feb 1999 07:58:05 +0000 (07:58 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Fri, 5 Feb 1999 07:58:05 +0000 (07:58 +0000)
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

gcc/java/ChangeLog
gcc/java/class.c
gcc/java/lex.c

index dfd7dcb5565cf624f9ae4f79e73a79042663758a..31e65da1ed1e533440bf6818e68d76a54d85b3fc 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 1999-02-04  Andrew Haley  <aph@cygnus.com>
 
        * class.c (build_utf8_ref): Output signatures using '.' as a
index 69fef554e3b3ab3ef1d07262a17330c4e82c0e3f..3f2adbddb188b14fc78536aace8516aa23b56038 100644 (file)
@@ -1135,7 +1135,8 @@ make_class_data (type)
   PUSH_FIELD_VALUE (cons, "accflags",
                    build_int_2 (get_access_flags_from_decl (type_decl), 0));
 
-  PUSH_FIELD_VALUE (cons, "superclass", super);
+  PUSH_FIELD_VALUE (cons, "superclass", 
+                   CLASS_INTERFACE (type_decl) ? null_pointer_node : super);
   PUSH_FIELD_VALUE (cons, "constants", constant_pool_constructor);
   PUSH_FIELD_VALUE (cons, "methods",
                    build1 (ADDR_EXPR, method_ptr_type_node, methods_decl));
index 9984ab977fa4df67e767869339b8f0b380f7eb17..e1e10743a5847552ae08d1b71334f78d3dd78c79 100644 (file)
@@ -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),
This page took 0.070478 seconds and 5 git commands to generate.