From: Jason Merrill Date: Wed, 14 Apr 1999 12:20:06 +0000 (-0400) Subject: new X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d15985c8f85090082ea8d09075af0e07d5e957ca;p=gcc.git new From-SVN: r26453 --- diff --git a/gcc/testsuite/g++.old-deja/g++.ext/addrfunc1.C b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc1.C new file mode 100644 index 00000000000..3e254e6f82b --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ext/addrfunc1.C @@ -0,0 +1,18 @@ +// Test that taking the address of a member function name produces +// a pointer to member function. +// Contributed by Jason Merrill +// Special g++ Options: -fpermissive -w +// Build don't link: + +struct A { }; +int (A::*p)(); + +struct B { + int f () { return 0; } + void g (); +}; + +void B::g () +{ + p = (int (A::*)())&f; +}