xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_325.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_325.c,v 1.3 2022/06/17 06:59:16 rillig Exp $	*/
2 # 3 "msg_325.c"
3 
4 /* Test for message: variable declaration in for loop [325] */
5 
6 /* lint1-flags: -sw */
7 
8 int printf(const char *, ...);
9 
10 void example(void)
11 {
12 	/* expect+1: error: variable declaration in for loop [325] */
13 	for (int i = 0; i < 10; i++)
14 		printf("%d\n", i);
15 }
16