Commit eabb2eba by Mike Stump Committed by Jason Merrill

search.c (compute_access): Handle protected constructors in derived classes as accessible.

	* search.c (compute_access): Handle protected constructors in derived
	classes as accessible.

From-SVN: r17670
parent 1230327b
Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
* search.c (compute_access): Handle protected constructors in derived
classes as accessible.
Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com> Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
* expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code): * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
......
...@@ -977,7 +977,7 @@ compute_access (basetype_path, field) ...@@ -977,7 +977,7 @@ compute_access (basetype_path, field)
else if (TREE_PROTECTED (field)) else if (TREE_PROTECTED (field))
{ {
if (current_class_type if (current_class_type
&& static_mem && (static_mem || DECL_CONSTRUCTOR_P (field))
&& ACCESSIBLY_DERIVED_FROM_P (context, current_class_type)) && ACCESSIBLY_DERIVED_FROM_P (context, current_class_type))
PUBLIC_RETURN; PUBLIC_RETURN;
else else
......
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