diff options
author | Robert Lipe <robertl@gcc.gnu.org> | 1998-06-18 08:31:29 +0000 |
---|---|---|
committer | Robert Lipe <robertl@gcc.gnu.org> | 1998-06-18 08:31:29 +0000 |
commit | 025b3f1485cba9e3b61289c141ad223508b64fd3 (patch) | |
tree | 394b9a885f1315270960c3b821693f363edbcb17 | |
parent | cab634f2e9a515de84b9c59a564b5df3bce7cd4a (diff) | |
download | gcc-025b3f1485cba9e3b61289c141ad223508b64fd3.zip gcc-025b3f1485cba9e3b61289c141ad223508b64fd3.tar.gz gcc-025b3f1485cba9e3b61289c141ad223508b64fd3.tar.bz2 |
New case from Klaus-Georg Adams.
From-SVN: r20557
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.robertl/eb131.C | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C new file mode 100644 index 0000000..2209700 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C @@ -0,0 +1,30 @@ +// Build don't link +// The call to a::foo() generates an error: +// eb131.C: In method `a::a()': +// eb131.C:26: no matching function for call to `a::foo (void (a::*)(double))' +// eb131.C:15: candidates are: a::foo(void (a::*)(float)) +// According to [over.over] in the CD2, &junk should resolve in this context. +// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> +// Reported against EGCS snaps 98/06/18. + +struct a { + a(); + void junk(); + void junk( int ); + void junk( float ); + void junk( double ); + + void foo( void (a::*member)(float) ); + void bar( void (*function)(float) ); +}; + +void baz(); +void baz( int ); +void baz( float ); +void baz( double ); + +a::a() +{ + foo( &junk ); + bar( &baz ); +} |