Now
MAIN commitmail json YAML
src/tests/usr.bin/xlint/lint1/d_c99_init.c@1.21
/
diff
/
nxr@1.21
src/tests/usr.bin/xlint/lint1/d_c99_init.exp@1.15 / diff / nxr@1.15
src/tests/usr.bin/xlint/lint1/d_c99_init.exp@1.15 / diff / nxr@1.15
tests/lint: ensure initialization does not modify shared type
In my not yet published rewrite of lint's init.c, I forgot to copy the
array type. Guard against this bug, which would have been hard to find.
Given that in C, the declaration 'int a[], b[]' creates two different
type objects anyway, it's not easy to come up with a test case that
actually triggers this possible bug. I'm not sure whether this test
indeed catches this bug. If not, I'll add another test.
In my not yet published rewrite of lint's init.c, I forgot to copy the
array type. Guard against this bug, which would have been hard to find.
Given that in C, the declaration 'int a[], b[]' creates two different
type objects anyway, it's not easy to come up with a test case that
actually triggers this possible bug. I'm not sure whether this test
indeed catches this bug. If not, I'll add another test.