From 2fc8ee77e02057b43adc93e2f28be0ff8ca17758 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 23 Sep 2004 16:21:31 +0000 Subject: [PATCH] re PR java/17380 (Bad diagnostic and ICE on valid code...) PR java/17380: * parse.y (not_accessible_p): Allow access to protected members even when class is not static. From-SVN: r87959 --- gcc/java/ChangeLog | 6 ++++++ gcc/java/parse.y | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index a33758f90f5..e172f97fa97 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2004-09-23 Tom Tromey + + PR java/17380: + * parse.y (not_accessible_p): Allow access to protected members + even when class is not static. + 2004-09-22 Kelley Cook * Make-lang.in: Revert the gcc-none.o change. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index b221a4c9f59..a66ebd3f07b 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -10065,7 +10065,7 @@ not_accessible_p (tree reference, tree member, tree where, int from_super) { if (inherits_from_p (where, reference)) return 0; - if (PURE_INNER_CLASS_TYPE_P (reference)) + if (INNER_CLASS_TYPE_P (reference)) reference = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (reference))); else break; @@ -10079,7 +10079,7 @@ not_accessible_p (tree reference, tree member, tree where, int from_super) { if (inherits_from_p (reference, DECL_CONTEXT (member))) return 0; - if (PURE_INNER_CLASS_TYPE_P (reference)) + if (INNER_CLASS_TYPE_P (reference)) reference = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (reference))); else break; -- 2.30.2