Module Name: src Committed By: christos Date: Fri Sep 26 15:27:12 UTC 2014
Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_for_loops.c Log Message: add a test for the bug I fixed yesterday, and explain the tests. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/d_c99_for_loops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_for_loops.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_for_loops.c:1.1 src/tests/usr.bin/xlint/lint1/d_c99_for_loops.c:1.2 --- src/tests/usr.bin/xlint/lint1/d_c99_for_loops.c:1.1 Sat Mar 17 12:33:15 2012 +++ src/tests/usr.bin/xlint/lint1/d_c99_for_loops.c Fri Sep 26 11:27:12 2014 @@ -4,7 +4,12 @@ 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; }