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:           Sun Feb 27 19:32:51 UTC 2022

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_219.c msg_219.exp msg_292.c
            msg_292.exp
        src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: concatenate string literals from left to right

Previously, the string literals "1" "2" "3" "4" were concatenated in the
order "23", "234", "1234".  This influenced the location of the
diagnostics for traditional C (which doesn't know concatenation at all)
and for mixing regular strings and wide strings.

Now the diagnostics occur exactly where they are expected.  The first
string literal defines whether the whole string is regular or wide, and
any further string literals must match it.

In traditional C mode, there are more diagnostics than before, but that
doesn't hurt since they are still correct and nobody uses lint in
traditional C mode anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_219.c \
    src/tests/usr.bin/xlint/lint1/msg_219.exp
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_292.c \
    src/tests/usr.bin/xlint/lint1/msg_292.exp
cvs rdiff -u -r1.385 -r1.386 src/usr.bin/xlint/lint1/cgram.y

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