Now
MAIN commitmail json YAML
src/tests/usr.bin/xlint/lint1/msg_168.c@1.5
/
diff
/
nxr@1.5
src/tests/usr.bin/xlint/lint1/msg_168.exp@1.5 / diff / nxr@1.5
src/usr.bin/xlint/lint1/init.c@1.133 / diff / nxr@1.133
src/tests/usr.bin/xlint/lint1/msg_168.exp@1.5 / diff / nxr@1.5
src/usr.bin/xlint/lint1/init.c@1.133 / diff / nxr@1.133
lint: fix initialization for arrays with designators
From the previous commit, there was an off-by-one error left, which was
due to the interaction between designation_add_subscript and
extend_if_array_of_unknown_size.
The other crucial point was to call initstack_pop_nobrace before
accessing the "current initialization stack element". Without this
call, in msg_168.c the "current element" would point to the initializer
level for 'const char *' instead of the one for 'array of const char *'.
One more step towards supporting C99.
From the previous commit, there was an off-by-one error left, which was
due to the interaction between designation_add_subscript and
extend_if_array_of_unknown_size.
The other crucial point was to call initstack_pop_nobrace before
accessing the "current initialization stack element". Without this
call, in msg_168.c the "current element" would point to the initializer
level for 'const char *' instead of the one for 'array of const char *'.
One more step towards supporting C99.