1 // { dg-do assemble } 2 // { dg-options "-pedantic-errors" } 3 cheat(int * i)4void cheat( int* i ) { ++(*i); } 5 6 struct t { cheatt7 void cheat( int& i ) { ++i; } 8 }; 9 main()10int main() 11 { 12 void (t::*member)( const int& ) = &t::cheat; // { dg-error "" } conversion 13 void (*cheater)( const int* ) = &cheat; // { dg-error "" } converting 14 t t2; 15 const int i=1; 16 int j=1; 17 (t2.*member)( i ); 18 (t2.*member)( j ); 19 } 20