| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "" } |
| 3 |
|
| 4 |
struct S { int a; long b; unsigned char c[63]; int d; }; |
| 5 |
S s = { |
| 6 |
#embed __FILE__ limit (64) prefix (.a = 1, .b = ) suffix (, .d = 2) // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } } |
| 7 |
}; |
| 8 |
const unsigned char t[66] = { |
| 9 |
#embed __FILE__ limit (64) prefix ([0] = 1, [1] =) suffix (, [65] = 2) // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } } |
| 10 |
}; |
| 11 |
int u[] = { [0] = |
| 12 |
#embed __FILE__ limit (64) // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } } |
| 13 |
}; |