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: r50143
This commit is contained in:
parent
07f521fc06
commit
28dc79bca6
|
@ -0,0 +1,14 @@
|
||||||
|
// Test that a base doesn't get special rights to convert to itself.
|
||||||
|
|
||||||
|
struct A {
|
||||||
|
void f ();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct B: private A { };
|
||||||
|
|
||||||
|
B b;
|
||||||
|
|
||||||
|
void A::f ()
|
||||||
|
{
|
||||||
|
A* ap = &b; // { dg-error "base|inherit" "" }
|
||||||
|
}
|
Loading…
Reference in New Issue