xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_340.c (revision 82d56013d7b633d116a93943de88e08335357a7c)
1 /*	$NetBSD: msg_340.c,v 1.1 2021/03/07 19:42:54 rillig Exp $	*/
2 # 3 "msg_340.c"
3 
4 // Test for message: initialization with '[a...b]' is a GNU extension [340]
5 
6 /*
7  * In strict C mode, GNU extensions are flagged as such.
8  */
9 
10 /* lint1-flags: -Ssw */
11 
12 int
13 example(void)
14 {
15 	int numbers[] = {
16 		[2 ... 3] = 12	/* expect: 340 */
17 	};
18 	return numbers[0];
19 }
20