Debian Codegraph @

gcc/testsuite/g++.dg/ext/desig3.C

raw
1 // PR c++/51229
2 // { dg-do compile }
3 // { dg-options "" }
4
5 struct A { int i; };
6
7 int a[5] = { .foo = 7 };// { dg-error "used in a GNU-style designated initializer for an array" }
8 int b[] = { .foo = 8 }; // { dg-error "used in a GNU-style designated initializer for an array" }
9 A c = { [0] = {} }; // { dg-error "used in a GNU-style designated initializer for class" }