xref: /aosp_15_r20/external/clang/test/Parser/designator.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1 // RUN: %clang_cc1 -fsyntax-only %s -verify -pedantic
2 
3 int X[] = {
4   [4]4,       // expected-warning {{use of GNU 'missing =' extension in designator}}
5   [5] = 7
6 };
7 
8 struct foo {
9   int arr[10];
10 };
11 
12 struct foo Y[10] = {
13   [4] .arr [2] = 4,
14 
15   // This is not the GNU array init designator extension.
16   [4] .arr [2] 4  // expected-error {{expected '=' or another designator}}
17 };
18