| 1 |
// PR c++/25137 |
| 2 |
// { dg-options "-Wmissing-braces" } |
| 3 |
|
| 4 |
struct S { int s[3]; }; |
| 5 |
S s1 = { 1, 1, 1 }; // { dg-warning "missing braces" } |
| 6 |
|
| 7 |
struct S1 { int s[3]; }; |
| 8 |
struct S2 { struct S1 a; }; |
| 9 |
S2 s21 = { 1, 1, 1 }; // { dg-warning "missing braces" } |
| 10 |
|
| 11 |
struct S3 { int s[3]; }; |
| 12 |
struct S4 { struct S3 a; int b; }; |
| 13 |
S4 s41 = { 1, 1, 1, 1 }; // { dg-warning "missing braces" } |
| 14 |
|
| 15 |
struct S5 { int s[3]; }; |
| 16 |
struct S6 { struct S5 a; int b; }; |
| 17 |
S6 s61 = { { 1, 1, 1 }, 1 }; // { dg-warning "missing braces" } |
| 18 |
|
| 19 |
struct S7 { int s[3]; }; |
| 20 |
struct S8 { int a; struct S7 b; }; |
| 21 |
S8 s81 = { 1, { 1, 1, 1 } }; // { dg-warning "missing braces" } |
| 22 |
|
| 23 |
struct S9 { int s[2]; }; |
| 24 |
struct S10 { struct S9 a; struct S9 b; }; |
| 25 |
S10 s101 = { { 1, 1 }, 1, 1 }; // { dg-warning "missing braces" } |
| 26 |
|
| 27 |
struct S11 { int s[2]; }; |
| 28 |
struct S12 { struct S11 a; struct S11 b; }; |
| 29 |
S12 s121 = { { 1, 1 }, { 1, 1 } }; // { dg-warning "missing braces" } |
| 30 |
|
| 31 |
struct S13 { int i; }; |
| 32 |
struct S14 { struct S13 a; }; |
| 33 |
struct S15 { struct S14 b; }; |
| 34 |
S15 s151 = { 1 }; // { dg-warning "missing braces" } |