History log of /src/tests/usr.bin/xlint/lint1/msg_124.c |
Revision | | Date | Author | Comments |
1.16 |
| 12-Apr-2025 |
rillig | lint: s/illegal/invalid/g
Lint does not provide legal advice.
|
1.15 |
| 26-Aug-2023 |
rillig | branches: 1.15.2; lint: make diagnostics about ANSI C more international
|
1.14 |
| 07-Jul-2023 |
rillig | lint: only skip 'unused' warnings after errors, not other warnings
Previously, in -w mode, any warning suppressed further 'unused' warnings, even though there was no need to do that. This can be seen in the test gcc_attribute_var.c, where only the last unused variable from a function was marked as unused, the others slipped through.
Fixed by counting the errors and the warnings separately and only combining them if actually desired.
|
1.13 |
| 28-Mar-2023 |
rillig | lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
|
1.12 |
| 16-Jun-2022 |
rillig | tests/lint: make expectation lines in the tests more detailed
This commit migrates msg_100 until msg_199.
|
1.11 |
| 14-Aug-2021 |
rillig | lint: use standard quoting style for messages 124 and 184
|
1.10 |
| 10-Jul-2021 |
rillig | tests/lint: move test for __attribute__ out of msg_124.c
That test case didn't belong there since there was no chance of getting an 'illegal pointer combination' by applying an operator.
|
1.9 |
| 13-Apr-2021 |
christos | add a test for a type attribute after a param function pointer
|
1.8 |
| 28-Feb-2021 |
rillig | tests/lint: keep messages in test files in sync with actual messages
Each of the tests named msg_*.c repeats the template of the message, to make the test somewhat self-contained when viewed in isolation.
This creates a redundancy, and keeping track of this manually is next to impossible. I tried it and failed in 9 cases, even though it has just been 2 months since I myself created the initial files and I knew all the time that this redundancy exists.
Be fool-proof for the future by checking this automatically.
|
1.7 |
| 15-Feb-2021 |
rillig | tests/lint: fix comments in test for message 124
|
1.6 |
| 24-Jan-2021 |
rillig | lint: fix wrong warning about null pointer comparison
|
1.5 |
| 24-Jan-2021 |
rillig | lint: demonstrate wrong 124 for flipped == as well
Since the fix in the next commit changes two places in the code, there must be two wrong error messages that disappear then.
|
1.4 |
| 24-Jan-2021 |
rillig | lint: demonstrate wrong 124 due to bug in is_typeok_eq
|
1.3 |
| 24-Jan-2021 |
rillig | lint: document bug in typeok_eq
Since rt is an alias for rn->tn_type->t_tspec, it cannot be PTR and VOID at the same time. This makes the condition unsatisfiable. Removing that part of the code didn't show any change in behavior, as expected.
It may even be that fixing this obvious bug doesn't show any change in behavior since that function is only used in a single place and check_pointer_comparison performs its own checks before issuing any warning.
At least the test cases added to msg_124.c all run as expected.
|
1.2 |
| 03-Jan-2021 |
rillig | lint: add test for message 124 "illegal pointer combination"
The message may be correct, but it is not helpful in any way. There are just too many function pointers that may differ in a very small detail.
Before tyname.c 1.20 from 2021-01-02, the string representation of type names was often limited to only 63 characters. Because of this, it made sense to omit any detail that could need more space than this. Now that this limitation is gone, it's reasonable to add more detail to the type information, especially since that information is readily available.
|
1.1 |
| 02-Jan-2021 |
rillig | lint: add a test for each message produced by lint1
Having a test for each message ensures that upcoming refactorings don't break the basic functionality. Adding the tests will also discover previously unknown bugs in lint.
The tests ensure that every lint message can actually be triggered, and they demonstrate how to do so. Having a separate file for each test leaves enough space for documenting historical anecdotes, rationale or edge cases, keeping them away from the source code.
The interesting details of this commit are in Makefile and t_integration.sh. All other files are just auto-generated.
When running the tests as part of ATF, they are packed together as a single test case. Conceptually, it would have been better to have each test as a separate test case, but ATF quickly becomes very slow as soon as a test program defines too many test cases, and 50 is already too many. The time complexity is O(n^2), not O(n) as one would expect. It's the same problem as in tests/usr.bin/make, which has over 300 test cases as well.
|
1.15.2.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|