xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_072.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_072.c,v 1.7 2022/10/01 09:42:40 rillig Exp $	*/
2 # 3 "msg_072.c"
3 
4 // Test for message: typedef declares no type name [72]
5 
6 /* expect+1: warning: typedef declares no type name [72] */
7 typedef int;
8 
9 typedef int number;
10 
11 /* expect+1: warning: typedef declares no type name [72] */
12 const typedef;
13 
14 void
15 cover_cgram_declaration(void)
16 {
17 
18 	/* expect+1: warning: typedef declares no type name [72] */
19 	typedef const;
20 
21 	/* expect+1: warning: empty declaration [2] */
22 	const;
23 
24 	/* expect+1: warning: typedef declares no type name [72] */
25 	typedef int;
26 
27 	/* expect+1: warning: empty declaration [2] */
28 	int;
29 
30 	/* expect+1: error: syntax error 'missing base type for typedef' [249] */
31 	typedef not_a_type;
32 
33 	/* expect+1: error: old-style declaration; add 'int' [1] */
34 	static missing_type;
35 }
36