Home | History | Annotate | Download | only in lint1
History log of /src/tests/usr.bin/xlint/lint1/platform_lp64.c
RevisionDateAuthorComments
 1.19  15-May-2025  rillig lint: handle __attribute__ after a declarator
 1.18  15-May-2025  rillig lint: handle __attribute__ at the beginning of a declaration
 1.17  14-May-2025  rillig lint: accept '__attribute__((mode(TI)))' before 'unsigned'
 1.16  14-May-2025  rillig tests/lint: demonstrate missing __attribute__((mode(TI))) cases

Seen in compiler_rt/popcountti2.c.
 1.15  28-Jan-2025  rillig tests/lint: fix platform-specific tests for <ctype.h> usage

On arm (32-bit, ptrdiff_t is long), there was an extra warning that
didn't show up on i386 or x86_64.

After moving the test to the platform-specific tests, the i386 test shows
an additional warning about integer overflow. This is because the
platform-specific tests run with more lint warnings enabled than in
msg_341.c.
 1.14  30-Mar-2024  rillig lint: do not convert array subscripts from size_t to ptrdiff_t

The C standards do not specify a fixed type for an array subscript, it
just has to be an integer type. Previously, query 4 fired for the
ubiquitous expression 'ptr[sz]' when sz had type 'size_t'.

The test platform_ilp32_long is unaffected by this change, as the
integer constant 0x80000000 has type 'unsigned int', while size_t is
'unsigned long' on those platforms, and even though the types 'unsigned
int' and 'unsigned long' have the same value space, there's still a
conversion, at least for now.
 1.13  30-Mar-2024  rillig lint: reword messages about array subscripts to sound more natural
 1.12  10-Mar-2024  rillig lint: add details to the message about integer overflow

Having only the operator was too unspecific to be actionable, so add the
actual numbers and the data type.
 1.11  10-Mar-2024  rillig lint: saturate signed integer overflow

In array address calculations, this prevents a 'array subscript cannot
be negative' for large array subscripts.
 1.10  10-Mar-2024  rillig tests/lint: enable test for integer overflow in array index
 1.9  09-Mar-2024  rillig tests/lint: demonstrate integer overflow on lp64 platforms
 1.8  09-Mar-2024  rillig tests/lint: test check for out-of-bounds array index
 1.7  08-Jul-2023  rillig lint: warn about conversion from 128-bit to smaller integer types
 1.6  08-Jul-2023  rillig tests/lint: demonstrate missing warning for converting int128_t
 1.5  28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4  22-Feb-2023  rillig tests/lint: add platform-specific tests
 1.3  11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.2  26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1  26-Sep-2021  rillig tests/lint: add tests for platform characteristics

Running lint in usr.bin/make on i386 fails due to this warning:

cond.c(800): warning: argument #3 is converted from 'unsigned char' to
'unsigned int' due to prototype [259]

This warning only occurred on i386 but not on sparc or x86_64. Try to
reproduce the test situation in platform_int.

The platform code in t_integration.sh was not strict enough, it didn't
check for multiple conditions, such as in msg_132_ilp32. That test was
only supposed to run on ILP32 platforms where size_t is unsigned int. It
also ran on sparc, even though size_t is long there.

RSS XML Feed