blob: 11b7e10ed47d7f934193f97e801774b188effa46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// PRMS Id: 5073
// Bug: g++ doesn't catch access violations in base initializers.
// Special g++ Options: -w
int r = 0;
class A {
private:
A() { r = 1; } // ERROR -
~A() {} // ERROR -
};
class B : public A {
public:
B(): A() {} // ERROR -
B(const B&) {} // ERROR -
~B() { } // ERROR - private dtor
};
main()
{
B b;
return r;
}
|