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
This commit is contained in:
Tom Tromey 2004-09-23 16:21:31 +00:00 committed by Tom Tromey
parent 53d26678b9
commit 2fc8ee77e0
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-09-23 Tom Tromey <tromey@redhat.com>
PR java/17380:
* parse.y (not_accessible_p): Allow access to protected members
even when class is not static.
2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in: Revert the gcc-none.o change.

View File

@ -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;