URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// { dg-do compile }
|
// { dg-do compile }
|
|
|
// Origin: David Baron
|
// Origin: David Baron
|
|
|
// PR c++/3765: Changing access from public to private by member
|
// PR c++/3765: Changing access from public to private by member
|
// using declaration.
|
// using declaration.
|
|
|
class A
|
class A
|
{
|
{
|
public:
|
public:
|
int foo() { return 1; } // { dg-error "inaccessible" }
|
int foo() { return 1; } // { dg-error "inaccessible" }
|
};
|
};
|
|
|
class B : public A
|
class B : public A
|
{
|
{
|
private:
|
private:
|
using A::foo;
|
using A::foo;
|
};
|
};
|
|
|
int main()
|
int main()
|
{
|
{
|
B b;
|
B b;
|
return b.foo(); // { dg-error "this context" }
|
return b.foo(); // { dg-error "this context" }
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.