Lines Matching +full:array +full:- +full:union
1 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-unknown-unknown %s
5 int complete_array_from_init_check[((sizeof(complete_array_from_init) / sizeof(int)) == 13)? 1 : -1…
11 [ 8 ... 7 ] = 4, // expected-error{{array designator range [8, 7] is empty}}
13 [-1] = 6 // expected-error{{array designator value '-1' is negative}}
17 [10] = 1, // expected-error{{array designator index (10) exceeds array bounds (10)}}
21 [3] 2, // expected-warning{{use of GNU 'missing =' extension in designator}}
22 [5 ... 12] = 2 // expected-error{{array designator index (12) exceeds array bounds (10)}}
32 x: 2.0, // expected-warning{{}}
33 ….a = 4.0, // expected-error{{field designator 'a' does not refer to any field in type 'struct poin…
37 [1] = 1.0 // expected-error{{array designator cannot initialize non-array type}}
40 struct point array[10] = { variable
43 …[2].z = 3.0, // expected-error{{field designator 'z' does not refer to any field in type 'struct p…
47 [10].x = 2.0, // expected-error{{array designator index (10) exceeds array bounds (10)}}
48 [4 ... 5].y = 2.0, // expected-note 2 {{previous initialization is here}}
49 …[4 ... 6] = { .x = 3, .y = 4.0 } // expected-warning 2 {{subobject initialization overrides initi…
53 .x = 5 // expected-error{{field designator cannot initialize a non-struct, non-union type}}
70 int windows_size[((sizeof(windows) / sizeof(struct rect)) == 6)? 1 : -1];
73 [2].top_left = { { .x = 1.1 } }, // expected-error{{designator in initializer for scalar type}}
82 [5].windows[3].top_left.x = { 7.0 } // expected-warning{{braces around scalar initializer}}
106 int zz_sizecheck[sizeof(zz) / sizeof(struct outer) == 8? 1 : -1 ];
132 [0] = (struct X){1, 2}, // expected-note 2 {{previous initialization is here}} in test()
133 …[0].c = 3, // expected-warning{{subobject initialization overrides initialization of other fields… in test()
134 (struct X) {4, 5, 6}, // expected-note{{previous initialization is here}} in test()
135 …[1].b = get8(), // expected-warning{{subobject initialization overrides initialization of other fi… in test()
136 …[0].b = 8 // expected-warning{{subobject initialization overrides initialization of other fields… in test()
140 union { char c; long l; } u1 = { .l = 0xFFFF };
148 0, // expected-note{{previous initialization is here}}
149 0, // expected-note{{previous initialization is here}}
150 …[2].before = 0, // expected-warning{{initializer overrides prior initialization of this subobject}}
151 0, // expected-warning{{initializer overrides prior initialization of this subobject}}
179 union wibble {
184 const union wibble wobble = { .arr2[0] = 0xffff,
188 const union wibble wobble2 = { .arr2 = {4, 5, 6}, 7 }; // expected-warning{{excess elements in unio…
192 union { int i; };
204 union {
219 &f0, // expected-note{{previous}}
221 .float_ptr = &f0 // expected-warning{{overrides}}
226 typedef union {
238 .b[0] = 0, // expected-note{{previous}}
239 .a.one = 1, // expected-warning{{overrides}} expected-note{{previous}}
240 .b[2] = 2, // expected-warning{{overrides}} expected-note{{previous}}
241 .a.three = 3, // expected-warning{{overrides}}
246 .a.three = 13, // expected-note{{previous}}
247 .b[2] = 12, // expected-warning{{overrides}} expected-note{{previous}}
248 .a.one = 11, // expected-warning{{overrides}} expected-note{{previous}}
249 .b[0] = 10, // expected-warning{{overrides}}
254 .a.one = 21, // expected-note{{previous}}
255 .b[1] = 20, // expected-warning{{overrides}}
260 .b[1] = 30, // expected-note{{previous}}
261 .a = { // expected-warning{{overrides}}
269 [1].a.zero = 3,// expected-note{{previous}}
271 [1].b[1] = 4 // expected-warning{{overrides}}
285 union {
315 // C1X lookup-based anonymous member init cases
318 .a = 1 // expected-note{{previous initialization is here}}
320 .a = 2, // expected-warning{{initializer overrides prior initialization of this subobject}}
326 .b = 1 // expected-error{{field designator 'b' does not refer to any field}}
334 { { "foo" }, 1 }, // expected-note {{previous initialization is here}}
335 …[0].L[2] = 'x' // expected-warning{{subobject initialization overrides initialization of other fie…
341 { { "foo" }, 1 }, // expected-note{{previous initialization is here}}
342 …[0].L[4] = 'x' // expected-warning{{subobject initialization overrides initialization of other fie…
346 "foo", 1, // expected-note{{previous initialization is here}}
347 …[0].L[4] = 'x' // expected-warning{{subobject initialization overrides initialization of other fi…
352 [0].L[4] = 'x' // no-warning