re PR c++/18368 (C++ error message regression)
[gcc.git] / gcc / testsuite / g++.old-deja / g++.law / ctors5.C
1 // { dg-do assemble }
2 // GROUPS passed constructors
3 // ctors file
4 // Subject: bug in handling static const object of the enclosing class
5 // Date: Tue, 1 Sep 92 10:38:44 EDT
6
7 class X
8 { // { dg-error "X::X" } implicit constructor
9 private:
10 int x;
11 public:
12 static const X x0;
13 X( int );
14 };
15
16 class Y
17 {
18 private:
19 X xx;
20 public:
21 Y();
22 }
23 X::X( int xi ) // { dg-error "return type|X::X|semicolon" }
24 {
25 x = xi;
26 }
27
28 const X X::x0( 0 );
29
30 Y::Y() // { dg-error "no match" }
31 {
32 xx = X::x0;
33 }