summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/ptrmem2.C
blob: 88c3932105da1984edefc624a6a4c8bb8bb754bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }
class cow {
public:
  void moo (char *);
};

void f()
{
  cow* c;

  void (cow::*fp0)(char*) = &cow::moo;  // OK
  void (cow::*fp1)(int) = &cow::moo;    // { dg-error "" } conversion
  int (cow::*fp2)(char*) = &cow::moo;   // { dg-error "" } conversion
  int (cow::*fp3)(char*, void*) = fp2;  // { dg-error "" } conversion
  int (cow::*fp4)(double) = (int (cow::*)(double)) fp2; // OK
}