xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_002.c (revision b2baa50111d645353fa30b4deab0f79d93650c8c)
1 /*	$NetBSD: msg_002.c,v 1.6 2023/03/28 14:44:34 rillig Exp $	*/
2 # 3 "msg_002.c"
3 
4 // Test for message: empty declaration [2]
5 
6 /* lint1-extra-flags: -X 351 */
7 
8 /* expect+1: warning: empty declaration [2] */
9 int;
10 
11 int local_variable;
12 
13 /* expect+1: warning: empty declaration [2] */
14 const;
15 
16 void
cover_cgram_declaration(void)17 cover_cgram_declaration(void)
18 {
19 
20 	/* expect+1: warning: typedef declares no type name [72] */
21 	typedef const;
22 
23 	/* expect+1: warning: empty declaration [2] */
24 	const;
25 
26 	/* expect+1: warning: typedef declares no type name [72] */
27 	typedef int;
28 
29 	/* expect+1: warning: empty declaration [2] */
30 	int;
31 }
32