Commit 473e7b07 by Tom Tromey Committed by Tom Tromey

re GNATS gcj/124 (protected constructor for InvocationTargetException still visible)

	* parse.y (not_accessible_p): Use member's class, not current
	class, when doing inheritance check for protected reference.
	Fixes PR gcj/124.

From-SVN: r33315
parent b3b42a4d
2000-04-20 Tom Tromey <tromey@cygnus.com>
* parse.y (not_accessible_p): Use member's class, not current
class, when doing inheritance check for protected reference.
Fixes PR gcj/124.
Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com> Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com>
* jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction. * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
......
...@@ -9125,14 +9125,14 @@ not_accessible_p (reference, member, from_super) ...@@ -9125,14 +9125,14 @@ not_accessible_p (reference, member, from_super)
/* Otherwise, access is granted if occuring from the class where /* Otherwise, access is granted if occuring from the class where
member is declared or a subclass of it */ member is declared or a subclass of it */
if (inherits_from_p (reference, current_class)) if (inherits_from_p (reference, DECL_CONTEXT (member)))
return 0; return 0;
return 1; return 1;
} }
/* Check access on private members. Access is granted only if it /* Check access on private members. Access is granted only if it
occurs from within the class in witch it is declared. Exceptions occurs from within the class in which it is declared. Exceptions
are access from inner-classes. This section is probably not are accesses from inner-classes. This section is probably not
complete. FIXME */ complete. FIXME */
if (access_flag & ACC_PRIVATE) if (access_flag & ACC_PRIVATE)
return (current_class == DECL_CONTEXT (member) ? 0 : return (current_class == DECL_CONTEXT (member) ? 0 :
...@@ -9143,7 +9143,7 @@ not_accessible_p (reference, member, from_super) ...@@ -9143,7 +9143,7 @@ not_accessible_p (reference, member, from_super)
REFERENCE is defined in the current package */ REFERENCE is defined in the current package */
if (ctxp->package) if (ctxp->package)
return !class_in_current_package (reference); return !class_in_current_package (reference);
/* Otherwise, access is granted */ /* Otherwise, access is granted */
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment