From 6c9ef6d420830674a05693b1473e30f1292722bd Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 7 May 1999 05:54:10 -0400 Subject: new From-SVN: r26816 --- gcc/testsuite/g++.old-deja/g++.ext/addrfunc2.C | 16 ++++++++++++++++ gcc/testsuite/g++.old-deja/g++.ext/addrfunc3.C | 13 +++++++++++++ gcc/testsuite/g++.old-deja/g++.mike/net36.C | 2 +- gcc/testsuite/g++.old-deja/g++.other/defarg2.C | 15 +++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.old-deja/g++.ext/addrfunc2.C create mode 100644 gcc/testsuite/g++.old-deja/g++.ext/addrfunc3.C create mode 100644 gcc/testsuite/g++.old-deja/g++.other/defarg2.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.old-deja/g++.ext/addrfunc2.C b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc2.C new file mode 100644 index 0000000..da98333 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc2.C @@ -0,0 +1,16 @@ +// Test for implicit & on methods. +// Contributed by Jason Merrill . +// Special g++ Options: -fpermissive -w + +struct A { + void f (int = 0) { } +}; + +int +main () +{ + void (A::*p)(int) = 0; + p = A::f; + if (p != A::f) + return 1; +} diff --git a/gcc/testsuite/g++.old-deja/g++.ext/addrfunc3.C b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc3.C new file mode 100644 index 0000000..7926eba --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc3.C @@ -0,0 +1,13 @@ +// Test for overload resolution in comparison expressions. +// Contributed by Jason Merrill . +// Special g++ Options: -fpermissive -w + +void f (int) { } +void f (); + +int main () { + void (*p)(int); + p = f; + if (p != f) + return 1; +} diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net36.C b/gcc/testsuite/g++.old-deja/g++.mike/net36.C index ca86796..843c314 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/net36.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/net36.C @@ -11,7 +11,7 @@ typedef void (A::*handler) (X*); class B { public: - void setHandler(handler); // ERROR - fn ref in err msg + void setHandler(handler); }; void f(B* b) { diff --git a/gcc/testsuite/g++.old-deja/g++.other/defarg2.C b/gcc/testsuite/g++.old-deja/g++.other/defarg2.C new file mode 100644 index 0000000..edb0770 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/defarg2.C @@ -0,0 +1,15 @@ +// Test that default args don't mess up pmf type comparisons. +// Contributed by Jason Merrill . + +struct A { + void f (int = 0) { } +}; + +int +main () +{ + void (A::*p)(int) = 0; + p = &A::f; + if (p != &A::f) + return 1; +} -- cgit v1.1