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:           Sat Mar 13 13:14:14 UTC 2021

Modified Files:
        src/tests/usr.bin/indent: token-preprocessing.0.stdout
        src/usr.bin/indent: indent.c

Log Message:
indent: fix handling of '/*' in string literal in preprocessing line

Previously, the '/*' in the string literal had been interpreted as the
beginning of a comment, which was wrong.  Because of that, the variable
declaration in the following line was still interpreted as part of the
comment.  The comment even continued until the end of the file.

Due to indent's forgiving nature, it neither complained nor even
mentioned that anything had gone wrong.  The decision of rather
producing wrong output than failing early is a dangerous one.

At least, there should have been an error message that at the end of the
file, the parser was still in a a comment, expecting the closing '*/'.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
    src/tests/usr.bin/indent/token-preprocessing.0.stdout
cvs rdiff -u -r1.54 -r1.55 src/usr.bin/indent/indent.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