blob: e708869d268ea652772bb6989f8db1176fc44958 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* $NetBSD: parse_stmt_iter_error.c,v 1.3 2023/03/28 14:44:35 rillig Exp $ */
# 3 "parse_stmt_iter_error.c"
/*
* Test parsing of errors in iteration statements (while, do, for).
*/
/* lint1-extra-flags: -X 351 */
void do_nothing(void);
void
cover_iteration_statement_while(_Bool cond)
{
while (cond)
/* expect+1: error: syntax error ']' [249] */
];
}
void
cover_iteration_statement_do(void)
{
do
/* expect+1: error: syntax error ']' [249] */
];
}
void
cover_iteration_statement_for(void)
{
for (int i = 0; i < 10; i++)
/* expect+1: error: syntax error ']' [249] */
];
}
|