History log of /src/tests/usr.bin/xlint/lint1/platform_ilp32_int.c |
Revision | | Date | Author | Comments |
1.9 |
| 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.8 |
| 30-Mar-2024 |
rillig | branches: 1.8.2; 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.7 |
| 30-Mar-2024 |
rillig | lint: reword messages about array subscripts to sound more natural
|
1.6 |
| 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.5 |
| 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.4 |
| 09-Mar-2024 |
rillig | tests/lint: demonstrate integer overflow on lp64 platforms
|
1.3 |
| 09-Mar-2024 |
rillig | tests/lint: test check for out-of-bounds array index
|
1.2 |
| 28-Mar-2023 |
rillig | lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
|
1.1 |
| 27-Feb-2023 |
rillig | lint: split platform-specific test for loss of accuracy
Lint distinguishes between platforms where size_t is unsigned int and platforms where size_t is unsigned long.
|
1.8.2.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|