aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-03-13 18:35:01 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-03-13 18:35:01 +0000
commit2f29e5e8678c5a39d6affeb527024eedb27f731e (patch)
treef4d0e5e045dd952c3df01f97558193f73b45530f /gcc
parent3bed29309b78d8e7f4a13720288562bfd8dd095e (diff)
downloadgcc-2f29e5e8678c5a39d6affeb527024eedb27f731e.zip
gcc-2f29e5e8678c5a39d6affeb527024eedb27f731e.tar.gz
gcc-2f29e5e8678c5a39d6affeb527024eedb27f731e.tar.bz2
parse.y (resolve_inner_class): Error if qualifier is a primitive type.
* parse.y (resolve_inner_class): Error if qualifier is a primitive type. From-SVN: r64314
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/parse.y11
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 13fa86a..46f2950 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -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.
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 82293ed..b8abc0e 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -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;