#
313458bc |
| 01-May-2024 |
rillig <rillig@NetBSD.org> |
lint: support _Alignas and __attribute__((__aligned(4)))
|
#
b2baa501 |
| 28-Mar-2023 |
rillig <rillig@NetBSD.org> |
lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
|
#
a649f3d0 |
| 25-Aug-2022 |
rillig <rillig@NetBSD.org> |
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
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@.
show more ...
|
#
c83f7def |
| 17-Jun-2022 |
rillig <rillig@NetBSD.org> |
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 mean
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.
show more ...
|
#
512bf5dc |
| 16-Nov-2021 |
rillig <rillig@NetBSD.org> |
lint: rename attron to in_gcc_attribute
No functional change.
|
#
2116d9a5 |
| 26-Jul-2021 |
rillig <rillig@NetBSD.org> |
lint: fix parse error in conditional expression (since 2021-07-15)
|
#
3120116e |
| 26-Jul-2021 |
rillig <rillig@NetBSD.org> |
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 pract
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.
show more ...
|
#
51b2be3c |
| 26-Jul-2021 |
rillig <rillig@NetBSD.org> |
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
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.
show more ...
|
#
036149f3 |
| 26-Jul-2021 |
rillig <rillig@NetBSD.org> |
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.
|
#
4c2e2660 |
| 15-Jul-2021 |
rillig <rillig@NetBSD.org> |
tests/lint: explain global variables in __attribute__
|
#
4617d7fe |
| 15-Jul-2021 |
rillig <rillig@NetBSD.org> |
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 wa
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.
show more ...
|
#
60f9e3d3 |
| 15-Jul-2021 |
rillig <rillig@NetBSD.org> |
tests/lint: test precedence of operators
|