msg_022.c revision 1.3
1/* $NetBSD: msg_022.c,v 1.3 2022/04/02 20:12:46 rillig Exp $ */ 2# 3 "msg_022.c" 3 4// Test for message: incomplete or misplaced function definition [22] 5 6/* 7 * Before decl.c 1.264 and func.c 1.130 from 2022-04-02, lint ran into 8 * assertion failures after trying to recover from the below syntax error. 9 */ 10/* expect+1: error: syntax error 'f' [249] */ 11unsigned long asdf = sizeof(int f() {}); 12 13/* Give the parser a chance to recover. */ 14/* expect+1: warning: empty declaration [0] */ 15; 16 17/* 18 * Before decl.c 1.264 and func.c 1.130 from 2022-04-02, lint ran into 19 * assertion failures after trying to recover from the below syntax error. 20 */ 21/* expect+1: error: syntax error 'param1' [249] */ 22unsigned long sz = sizeof(int(param1, param2)); 23 24/* Give the parser a chance to recover. */ 25/* expect+1: warning: empty declaration [0] */ 26; 27 28/* expect+1: error: syntax error ':' [249] */ 29TODO: "Add example code that triggers the above message." 30TODO: "Add example code that almost triggers the above message." 31