Home | History | Annotate | Download | only in lint1
History log of /src/tests/usr.bin/xlint/lint1/d_c99_bool.c
RevisionDateAuthorComments
 1.11  03-Jul-2023  rillig tests/lint: clean up tests for C99 bool
 1.10  28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9  16-Jan-2022  rillig tests/lint: update comment to reality
 1.8  15-Jan-2022  rillig tests/lint: expect complete messages in feature tests

Previously, the tests contained many comments like /* expect: 123 */,
which were useless to a casual reader since nobody is expected to learn
lint's message IDs by heart. Replace these with the complete
diagnostics, to show what lint is complaining about.

The tests named msg_*.c have been left unmodified since they mention the
full message text in their header comment.

No functional change.
 1.7  30-Mar-2021  rillig lint: rewrite handling of initializations, fixing several bugs

The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.

The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.

The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.

Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.

The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.

The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
 1.6  21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.5  10-Jan-2021  rillig lint: explain missing error for _Bool constant expressions
 1.4  10-Jan-2021  rillig lint: fix conversion of non-constant scalar to _Bool
 1.3  10-Jan-2021  rillig lint: fix conversion of constant expressions to _Bool
 1.2  10-Jan-2021  rillig lint: add test for converting non-constant expressions to _Bool
 1.1  10-Jan-2021  rillig lint: demonstrate wrong handling of conversion to _Bool

RSS XML Feed