blob: 6ed31b5d6b503025944f35764596e553f3eb51d0 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// PR c++/29043
// { dg-do compile }
struct S
{
int const i; // { dg-message "should be initialized" }
};
class C
{
public:
C() {} // { dg-error "uninitialized const member" }
S s;
};
struct S2
{
int& ref; // { dg-message "should be initialized" }
};
class C2
{
public:
C2() {} // { dg-error "uninitialized reference member" }
S2 s;
};
class C3
{
C3() { }
struct s {
const int i;
};
};
struct S4
{
int const i; // { dg-message "should be initialized" }
};
struct C4
{
C4() {} // { dg-error "uninitialized const member" }
S4 s4[ 1 ];
};
struct C5
{
C5() {} // { dg-message "uninitialized" }
int const iit[ 1 ];
};
|