URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p10769b.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// { dg-options "" }
// prms-id: 10769
#define PMF2PF(PMF) ((void (*)())(PMF))
class A {
public:
void f1a() { }
void main();
} a;
class B {
public:
void bf1() { }
} b;
void A::main() {
void (B::*mPtrB)(B*);
(*(void (*)(A*))PMF2PF(mPtrB))(&b); // { dg-error "argument passing" }
// { dg-warning "convert" "warn" { target *-*-* } 20 }
}
int main() {
void (A::*mPtr)() = &A::f1a;
(*(void (*)(A*))PMF2PF(mPtr))(&a); // { dg-warning "convert" }
}
Go to most recent revision | Compare with Previous | Blame | View Log