aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2002-02-28 10:32:38 -0500
committerJason Merrill <jason@gcc.gnu.org>2002-02-28 10:32:38 -0500
commit07f521fc064351fb67625b483461db5b0a452e25 (patch)
tree1fca790a59ac55c84f2791b592dd172e3f0ece9f /gcc
parentb96c434c39312a059e6a062b29993ec7d0a7da57 (diff)
downloadgcc-07f521fc064351fb67625b483461db5b0a452e25.zip
gcc-07f521fc064351fb67625b483461db5b0a452e25.tar.gz
gcc-07f521fc064351fb67625b483461db5b0a452e25.tar.bz2
search.c (lookup_base_r): Don't clear is_non_public just because we found a friendly scope.
* search.c (lookup_base_r): Don't clear is_non_public just because we found a friendly scope. From-SVN: r50140
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/search.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3ca4e5b..85f2547 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
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.
@@ -1182,7 +1185,7 @@ Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* 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.
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 10ebc73..018dfaa 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -201,8 +201,9 @@ lookup_base_r (binfo, base, access, within_current_scope,
&& !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))