Module Name: src Committed By: rillig Date: Sat Jul 2 09:48:18 UTC 2022
Modified Files: src/tests/usr.bin/xlint/lint1: msg_132.c Log Message: tests/lint: test bit shift with large integer types build_bit_shift converts the right-hand operand to INT or UINT, even though C11 6.5.7 doesn't say anything about narrowing conversions. Traditional C says that the operators '<<' and '>>' perform the usual arithmetic conversions. This has been dropped in C90. What lint actually does is something completely different. In the operators table in ops.def, the operators '<<' and '>>' are not marked as performing the usual arithmetic conversions (column 'balance'). This leaves all conversions to 'build_bit_shift', which converts the right-hand side to INT or UINT. There is no obvious reason for this conversion, as the bounds checks need to be performed no matter whether the type is INT or UINT128. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/tests/usr.bin/xlint/lint1/msg_132.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.