2002-02-28 Jason Merrill <jason@redhat.com>
+ * search.c (lookup_base_r): Don't clear is_non_public just because
+ we found a friendly scope.
+
* decl.c (finish_function): Only warn about missing return
statement with -Wreturn-type.
* search.c (get_vbase_1): Remove.
(get_vbase): Remove.
(convert_pointer_to_vbase): Remove.
- (lookup_base_recursive): New function.
+ (lookup_base_r): New function.
(lookup_base): New function.
* typeck.c (require_complete_type): Use lookup_base &
build_base_path instead of convert_pointer_to.
&& !within_current_scope
&& is_friend (BINFO_TYPE (binfo), current_scope ()))
{
+ /* Do not clear is_non_public here. If A is a private base of B, A
+ is not allowed to convert a B* to an A*. */
within_current_scope = 1;
- is_non_public = 0;
}
if (same_type_p (BINFO_TYPE (binfo), base))