diff options
Diffstat (limited to 'contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_for_loops.c')
-rw-r--r-- | contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_for_loops.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_for_loops.c b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_for_loops.c new file mode 100644 index 0000000..48e380c --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_for_loops.c @@ -0,0 +1,15 @@ +/* c99 for loops */ +extern void foo(int); + +int +main(void) +{ + // Test the basic functionality + for (int i = 0; i < 10; i++) + foo(i); + + // Test that the scope of the iterator is correct + for (int i = 0; i < 10; i++) + continue; + return 0; +} |