From d3ecb597b35d5b8c4176a0b60c10cbfdb40ace8b Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Sat, 10 Jul 2004 05:38:15 +0000 Subject: re PR java/8618 (call to private constructor allowed for anonymous inner class) 2004-07-09 Bryce McKinlay PR java/8618 * parse.y (create_anonymous_class): Remove 'location' argument. Use the WFL from TYPE_NAME to get line number for the decl. Fix comment. (craft_constructor): Inherit access flags for implicit constructor from the enclosing class. (create_class): Fix comment typo. (resolve_qualified_expression_name): Pass type of qualifier to not_accessible_p, not the type in which target field was found. (not_accessible_p): Handle inner classes. Expand protected qualifier-subtype check to enclosing instances, but don't apply this check to static members. Allow protected access to inner classes of a subtype. Allow private access within common enclosing context. (build_super_invocation): Get WFL line number info from current class decl. (build_incomplete_class_ref): Update for new create_anonymous_class signature. * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use common_enclosing_instance_p. * class.c (common_enclosing_context_p): New. Determine if types share a common enclosing context, even across static contexts. (common_enclosing_instance_p): Renamed from common_enclosing_context_p. Determines if types share a common non-static enclosing instance. * java-tree.h (common_enclosing_instance_p): Declare. * jcf-write.c (get_method_access_flags): New. Surpress private flag for inner class constructors. (generate_classfile): Use get_method_access_flags. From-SVN: r84443 --- gcc/java/java-tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 1fef832..d9e6415 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1238,6 +1238,7 @@ extern int get_access_flags_from_decl (tree); extern int interface_of_p (tree, tree); extern int inherits_from_p (tree, tree); extern int common_enclosing_context_p (tree, tree); +extern int common_enclosing_instance_p (tree, tree); extern int enclosing_context_p (tree, tree); extern tree build_result_decl (tree); extern void emit_handlers (void); -- cgit v1.1