xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1 struct Fooey {
2   void f(char* pX);
3   void f(int in);
4   void f(float fx);
5   void h(double dx);
6 };
7 
f(char *)8 void Fooey::f(char*) { }	// ERROR - candidate
f(int)9 void Fooey::f(int) { }		// ERROR - candidate
f(float)10 void Fooey::f(float) { }	// ERROR - candidate
h(double zahl)11 void Fooey::h(double zahl) { }
12 
main()13 int main() {
14   Fooey Blah;
15   void (Fooey::*pointer)(double);
16   pointer = &Fooey::f;		// ERROR - don't call Fooey::h
17   (Blah.*pointer)(42.5);
18   return 0;
19 }
20