#
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
|
Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
|
#
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.
|
#
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
|
Revision tags: netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
|
#
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.
|
#
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
|
Revision tags: netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
|
#
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.
|
#
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
|
Revision tags: netbsd-10-base
|
#
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.
|
#
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
|
Revision tags: netbsd-10-base
|
#
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.
|
#
1.4 |
|
22-Feb-2023 |
rillig |
tests/lint: add platform-specific tests
|
Revision tags: netbsd-10-base
|
#
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.
|