Now
MAIN commitmail json YAML
src/tests/usr.bin/xlint/lint1/d_c99_init.c@1.19
/
diff
/
nxr@1.19
src/usr.bin/xlint/lint1/init.c@1.173 / diff / nxr@1.173
src/usr.bin/xlint/lint1/init.c@1.173 / diff / nxr@1.173
lint: add test for assertion failure in initialization
The 'cnt = level->bl_type->t_tspec == STRUCT ? 2 : 1;' in
initialization_push_struct_or_union is obviously wrong since not every
struct has exactly 1 remaining member after the first member that has an
initializer with designation.
This bug started its life in init.c 1.12 from 2002-10-21, a little over
18 years ago.
The 'cnt = level->bl_type->t_tspec == STRUCT ? 2 : 1;' in
initialization_push_struct_or_union is obviously wrong since not every
struct has exactly 1 remaining member after the first member that has an
initializer with designation.
This bug started its life in init.c 1.12 from 2002-10-21, a little over
18 years ago.