summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
blob: f3fe0a8dd8ee4c8a3c9b631602ff6728e803a346 (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
// { dg-do assemble  }

struct A {
  int operator ++(); // { dg-error "" } candidates
  void operator ()(); // { dg-error "" } candidates
  void operator delete(void*); // { dg-error "" } candidates
};

struct B {
  int operator ++(int); // { dg-error "" } candidates
  void operator ()(); // { dg-error "" } candidates
  void operator delete(void*); // { dg-error "" } candidates
  void f();
};

struct C : public A, public B {
};

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