parse.y (resolve_inner_class): Error if qualifier is a primitive type.
authorTom Tromey <tromey@redhat.com>
Thu, 13 Mar 2003 18:35:01 +0000 (18:35 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 13 Mar 2003 18:35:01 +0000 (18:35 +0000)
* parse.y (resolve_inner_class): Error if qualifier is a primitive
type.

From-SVN: r64314

gcc/java/ChangeLog
gcc/java/parse.y

index 13fa86ab2ad079ddec84f2dba4719a7c5d9ceb51..46f29507fe2d054cdbc45f695e42820e064e25b2 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-13  Tom Tromey  <tromey@redhat.com>
+
+       * parse.y (resolve_inner_class): Error if qualifier is a primitive
+       type.
+
 2003-03-04  Andrew Haley  <aph@redhat.com>
 
         * gjavah.c (is_first_data_member): New global variable.
index 82293edfc724a139badf3d4fc288223c0258dc7c..b8abc0e67b160b539060e9bfa5d3822df5209f28 100644 (file)
@@ -3527,9 +3527,16 @@ resolve_inner_class (htab_t circularity_hash, tree cl, tree *enclosing,
            return decl;
        }
 
-      /* Now go to the upper classes, bail out if necessary. We will
+      /* Now go to the upper classes, bail out if necessary.  We will
         analyze the returned SUPER and act accordingly (see
-        do_resolve_class.) */
+        do_resolve_class).  */
+      if (JPRIMITIVE_TYPE_P (TREE_TYPE (local_enclosing))
+         || TREE_TYPE (local_enclosing) == void_type_node)
+       {
+         parse_error_context (cl, "Qualifier must be a reference");
+         local_enclosing = NULL_TREE;
+         break;
+       }
       local_super = CLASSTYPE_SUPER (TREE_TYPE (local_enclosing));
       if (!local_super || local_super == object_type_node)
         break;