Home | History | Annotate | Line # | Download | only in lint1
parse_stmt_iter_error.c revision 1.2
      1 /*	$NetBSD: parse_stmt_iter_error.c,v 1.2 2022/06/17 18:54:53 rillig Exp $	*/
      2 # 3 "parse_stmt_iter_error.c"
      3 
      4 /*
      5  * Test parsing of errors in iteration statements (while, do, for).
      6  */
      7 
      8 void do_nothing(void);
      9 
     10 void
     11 cover_iteration_statement_while(_Bool cond)
     12 {
     13 	while (cond)
     14 		/* expect+1: error: syntax error ']' [249] */
     15 		];
     16 }
     17 
     18 void
     19 cover_iteration_statement_do(void)
     20 {
     21 	do
     22 		/* expect+1: error: syntax error ']' [249] */
     23 		];
     24 }
     25 
     26 void
     27 cover_iteration_statement_for(void)
     28 {
     29 	for (int i = 0; i < 10; i++)
     30 		/* expect+1: error: syntax error ']' [249] */
     31 		];
     32 }
     33