URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [conv2.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do assemble }
// { dg-options "-pedantic-errors" }
void cheat( int* i ) { ++(*i); }
struct t {
void cheat( int& i ) { ++i; }
};
int main()
{
void (t::*member)( const int& ) = &t::cheat; // { dg-error "" } conversion
void (*cheater)( const int* ) = &cheat; // { dg-error "" } converting
t t2;
const int i=1;
int j=1;
(t2.*member)( i );
(t2.*member)( j );
}