xref: /minix3/tests/usr.bin/xlint/lint1/d_c99_for_loops.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
111be35a1SLionel Sambuc /* c99 for loops */
211be35a1SLionel Sambuc extern void foo(int);
311be35a1SLionel Sambuc 
411be35a1SLionel Sambuc int
main(void)511be35a1SLionel Sambuc main(void)
611be35a1SLionel Sambuc {
7*0a6a1f1dSLionel Sambuc 	// Test the basic functionality
811be35a1SLionel Sambuc 	for (int i = 0; i < 10; i++)
911be35a1SLionel Sambuc 		foo(i);
10*0a6a1f1dSLionel Sambuc 
11*0a6a1f1dSLionel Sambuc 	// Test that the scope of the iterator is correct
12*0a6a1f1dSLionel Sambuc 	for (int i = 0; i < 10; i++)
13*0a6a1f1dSLionel Sambuc 		continue;
1411be35a1SLionel Sambuc 	return 0;
1511be35a1SLionel Sambuc }
16