Home | History | Annotate | Download | only in lint1
History log of /src/tests/usr.bin/xlint/lint1/expr_precedence.c
RevisionDateAuthorComments
 1.12  01-May-2024  rillig lint: support _Alignas and __attribute__((__aligned(4)))
 1.11  28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.10  25-Aug-2022  rillig lint: remove explicit list of known GCC attributes

Most GCC attributes consist of a single identifier. Up to now, it was
necessary to list each of these identifiers in the grammar, even those
that only apply to a single target architecture.

Instead, parse the general form of attributes, matching the few
attributes that lint handles by name instead. While here, rename the
grammar rules to use the GCC terms.

To avoid conflicts between the global function 'printf' and the GCC
attribute of the same name, do not add GCC attributes to the symbol
table, and don't make these symbols 'extern' either.

ok christos@.
 1.9  17-Jun-2022  rillig tests/lint: make 'expect+-' comments stricter

Previously, the expectations from these comments were already satisfied
if the expectation occurred somewhere in the actual message from lint.
This meant that the prefix 'error:' or 'warning:' could be omitted from
the 'expect' comment. These omissions were hard to see in a manual
review. Now any omissions must be visually marked with '...'.

The test msg_342 now reports its messages properly as being in the file
msg_342.c, rather than msg_341.c. This had been a copy-and-paste
mistake.
 1.8  16-Nov-2021  rillig lint: rename attron to in_gcc_attribute

No functional change.
 1.7  26-Jul-2021  rillig lint: fix parse error in conditional expression (since 2021-07-15)
 1.6  26-Jul-2021  rillig tests/lint: show bug in conditional expression (since 2021-07-15)

Since cgram.y 1.325 from 2021-07-15, conditional expressions did not
accept a comma-expression in the then-branch anymore. In practice, this
is an edge case though since comma expressions are rare.
 1.5  26-Jul-2021  rillig lint: fix parsing of chained assignments (since 2021-07-15)

The grammar rule for assignment_expression is quite different from those
of the other expressions, for 2 reasons: first, its precedence is
right-to-left. Second, its left-hand side must be an lvalue, which
rules out all binary operators. K&R C even had a grammar rule named
'lvalue' for this purpose. Later C standards made the kinds of
expressions more fine-grained and used 'unary_expression' in this place.
 1.4  26-Jul-2021  rillig tests/lint: demonstrate bug in chained assignment (since 2021-07-15)

Since cgram.y 1.325 from 2021-07-15, lint has been parsing assignment
expressions correctly. It got the associativity wrong.
 1.3  15-Jul-2021  rillig tests/lint: explain global variables in __attribute__
 1.2  15-Jul-2021  rillig lint: in the grammar, replace %prec with explicit rules

This way, in the arguments of __attribute__, where only constant
expressions are expected, a '=' leads to a syntax error. Previously,
this was not detected.

No noticeable change in practice since these cases are already handled
by the compilers.
 1.1  15-Jul-2021  rillig tests/lint: test precedence of operators

RSS XML Feed