FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.ext / addrfunc1.C
blobe0948a5d3b5a2030007ce9bddda6c5692718602f
1 // Test that taking the address of a member function name produces
2 // a pointer to member function.
3 // Contributed by Jason Merrill <jason@cygnus.com>
4 // Special g++ Options: -fms-extensions
5 // Build don't link:
7 struct A { };
8 int (A::*p)();
10 struct B {
11   int f () { return 0; }
12   void g ();
15 void B::g ()
17   p = (int (A::*)())&f;