Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/usr.bin/xlint/lint1
Module Name: src
Committed By: rillig
Date: Sat Jul 2 10:23:38 UTC 2022
Modified Files:
src/usr.bin/xlint/lint1: tree.c
Log Message:
lint: only convert the right operand of '<<' or '>>' in traditional C
Traditional C says: "Then the right operand is converted to int".
C90 dropped that sentence, probably because it didn't have any effect on
the result or the conditions for undefined behavior.
To stick to the wording of the specification, also convert UINT to INT.
While here, fix the call to 'convert'. The first argument being 'CVT'
means that the conversion comes from a cast-expression instead of an
implicit conversion. This prevents warnings for 'uint64_t << uint64_t'.
Keeping this unnecessary conversion in C90 or later would have generated
warnings for the functions at the bottom of msg_132.c.
To generate a diff of this commit:
cvs rdiff -u -r1.466 -r1.467 src/usr.bin/xlint/lint1/tree.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