aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C
blob: 9a64de4dc3e1cf4f0eeb5c7ce2413d9cd84b2538 (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
// { dg-do assemble  }
#include <stdlib.h>

class A {
public:
  void z();
  A(void) {}
private:
  A(const A &) { abort(); } // { dg-error "private" } 
  const A& operator =(const A &) { abort(); }
};

class B : public A { // { dg-error "within" }
public:
  B(void) {}
};

void f(B b) {
}

void g() {
  B h;
  f(h); // { dg-error "synthesized|argument" } 
}