URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do compile }
|
// { dg-do compile }
|
|
|
// Origin: Mike Reed
|
// Origin: Mike Reed
|
|
|
// PR c++/11174: Access checking of pointer-to-member function
|
// PR c++/11174: Access checking of pointer-to-member function
|
|
|
class A {
|
class A {
|
protected:
|
protected:
|
void foo() {} // { dg-error "protected" }
|
void foo() {} // { dg-error "protected" }
|
public:
|
public:
|
A();
|
A();
|
};
|
};
|
|
|
class B : public A {
|
class B : public A {
|
void bar() {
|
void bar() {
|
A a;
|
A a;
|
void (A::*pmf)() = &A::foo; // { dg-error "this context" }
|
void (A::*pmf)() = &A::foo; // { dg-error "this context" }
|
(a.*pmf)();
|
(a.*pmf)();
|
}
|
}
|
};
|
};
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.