From: Mark Mitchell Date: Sat, 18 Apr 1998 01:12:22 +0000 (+0000) Subject: New test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4c81730d81f5899761de6895da0c845153bc095;p=gcc.git New test From-SVN: r19277 --- diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv2.C b/gcc/testsuite/g++.old-deja/g++.other/conv2.C new file mode 100644 index 00000000000..e713304c575 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/conv2.C @@ -0,0 +1,19 @@ +// Build don't link: +// Special g++ Options: -pedantic-errors + +void cheat( int* i ) { ++(*i); } + +struct t { + void cheat( int& i ) { ++i; } +}; + +int main() +{ + void (t::*member)( const int& ) = &t::cheat; // ERROR - conversion + void (*cheater)( const int* ) = &cheat; // ERROR - converting + t t2; + const int i=1; + int j=1; + (t2.*member)( i ); + (t2.*member)( j ); +}