Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only %s -verify -pedantic |
Chris Lattner | 79ed6b5 | 2008-10-26 23:22:23 +0000 | [diff] [blame] | 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 | }; |