blob: 481fe2cb86587718403e6a0924a4b547f5a4cfc5 [file] [log] [blame]
// Special g++ Options: -Wno-pmf-conversions
// Test conversion of pointers to virtual member functions to
// pointers to non-member functions.
struct A{
int i;
A::A():i(1){}
virtual void foo();
}a;
void A::foo()
{
i = 0;
}
int main()
{
void (*f)(A*) = (void(*)(A*))(&A::foo);
f(&a);
return a.i;
}