Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   rillig
Date:           Thu Mar 25 22:53:05 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_168.c msg_168.exp
        src/usr.bin/xlint/lint1: init.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_168.c \
    src/tests/usr.bin/xlint/lint1/msg_168.exp
cvs rdiff -u -r1.132 -r1.133 src/usr.bin/xlint/lint1/init.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index