1 /* $NetBSD: msg_072.c,v 1.8 2023/07/07 19:45:22 rillig Exp $ */ 2 # 3 "msg_072.c" 3 4 // Test for message: typedef declares no type name [72] 5 6 /* lint1-extra-flags: -X 351 */ 7 8 /* expect+1: warning: typedef declares no type name [72] */ 9 typedef int; 10 11 typedef int number; 12 13 /* expect+1: warning: typedef declares no type name [72] */ 14 const typedef; 15 16 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 /* expect+1: error: syntax error 'missing base type for typedef' [249] */ 33 typedef not_a_type; 34 35 /* expect+1: error: old-style declaration; add 'int' [1] */ 36 static missing_type; 37 } 38