summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
blob: 04e4afa1205bcd69834433014d898ad5745ebb03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Build don't link:

struct A {
  int operator ++();
  void operator ()();
  void operator delete(void*);
};

struct B {
  int operator ++(int);
  void operator ()();
  void operator delete(void*);
  void f();
};

struct C : public A, public B {
};

void f()
{
  C c;
  C* cp;
  
  delete cp; // ERROR - ambiguous
  c(); // ERROR - ambiguous
  c++; // ERROR - ambiguous
}