summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/pmf3.C
blob: 636ac5d345f968947f35e5a85990d26af9c5c294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do assemble  }
// From: enewton@uunet.uu.NET
// Subject: g++ 2.5.8: cannot cast member function pointers
// Date: 27 Jan 1994 01:22:56 -0500

struct A {
	void f(char);
	void g(int);
};

typedef void (A::*Ptr)(char);

void q() {
   Ptr p;

   p  = (Ptr) &A::f;
   p  = (Ptr) &A::g;
   p  = &A::f;
}