Home | History | Annotate | Line # | Download | only in lint1
      1 /*	$NetBSD: parse_stmt_error.c,v 1.3 2023/03/28 14:44:35 rillig Exp $	*/
      2 # 3 "parse_stmt_error.c"
      3 
      4 /*
      5  * Test parsing of errors in selection statements (if, switch).
      6  */
      7 
      8 /* lint1-extra-flags: -X 351 */
      9 
     10 void do_nothing(void);
     11 
     12 void
     13 cover_selection_statement_else(_Bool cond)
     14 {
     15 	if (cond)
     16 		do_nothing();
     17 	else
     18 		/* expect+1: error: syntax error ']' [249] */
     19 		];
     20 }
     21 
     22 void
     23 cover_selection_statement_switch(int x)
     24 {
     25 	switch (x)
     26 		/* expect+1: error: syntax error ']' [249] */
     27 		];
     28 }
     29