aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-03-21 19:00:24 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-03-21 19:00:24 +0000
commita577854518f8203550d0d1abcb377bae17cb6bd9 (patch)
tree1ecb7a1ea6c850d15f52f1ac4c00093516fae82f
parent43577e6bd7bb992e87d22b6ac5e13787f8a96af3 (diff)
downloadgcc-a577854518f8203550d0d1abcb377bae17cb6bd9.zip
gcc-a577854518f8203550d0d1abcb377bae17cb6bd9.tar.gz
gcc-a577854518f8203550d0d1abcb377bae17cb6bd9.tar.bz2
parse.y (build_access_to_thisn): Stop when FROM is not an inner class.
* parse.y (build_access_to_thisn): Stop when FROM is not an inner class. From-SVN: r51138
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/parse.y6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 7afd69d..2df70b6c 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-21 Tom Tromey <tromey@redhat.com>
+
+ * parse.y (build_access_to_thisn): Stop when FROM is not an inner
+ class.
+
2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 8f88c5d..eecb8ad 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -8548,7 +8548,7 @@ build_access_to_thisn (from, to, lc)
{
tree access = NULL_TREE;
- while (from != to)
+ while (from != to && PURE_INNER_CLASS_TYPE_P (from))
{
if (!access)
{
@@ -8568,8 +8568,8 @@ build_access_to_thisn (from, to, lc)
access = make_qualified_primary (cn, access, lc);
}
- /* if FROM isn't an inter class, that's fine, we've done
- enough. What we're looking for can be accessed from there. */
+ /* If FROM isn't an inner class, that's fine, we've done enough.
+ What we're looking for can be accessed from there. */
from = DECL_CONTEXT (TYPE_NAME (from));
if (!from)
break;