#
1.19 |
|
06-Aug-2023 |
rillig |
lint: since C99, a non-void function must return a value
|
#
1.18 |
|
09-Jul-2023 |
rillig |
lint: clean up wording in diagnostics
Use the term 'parameter' as defined in C99 3.15.
|
#
1.17 |
|
07-Jul-2023 |
rillig |
lint: warn about function definitions without header declaration
The existing warning was only issued for function declarations, not for function definitions.
The interesting change in the tests is in msg_351.c. Many other tests use non-static functions due to their syntactic brevity. In these tests, the warning is disabled individually, to allow new functions to be added without generating warning 351.
|
#
1.16 |
|
07-Jul-2023 |
rillig |
tests/lint: merge duplicate tests for C11 _Atomic
|
#
1.15 |
|
28-Mar-2023 |
rillig |
lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
|
#
1.14 |
|
04-Jan-2023 |
rillig |
tests/lint: fix typo in comment
|
Revision tags: netbsd-10-base
|
#
1.13 |
|
22-Jun-2022 |
rillig |
lint: add quotes around placeholders for the remaining messages
Reword some of the messages slightly, exchanging brevity for clarity.
Message 138 is kept as-is, as it is not yet covered by any tests.
Message 240 is kep as-is, as it is unreachable.
|
#
1.12 |
|
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.11 |
|
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.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.18 |
|
09-Jul-2023 |
rillig |
lint: clean up wording in diagnostics
Use the term 'parameter' as defined in C99 3.15.
|
#
1.17 |
|
07-Jul-2023 |
rillig |
lint: warn about function definitions without header declaration
The existing warning was only issued for function declarations, not for function definitions.
The interesting change in the tests is in msg_351.c. Many other tests use non-static functions due to their syntactic brevity. In these tests, the warning is disabled individually, to allow new functions to be added without generating warning 351.
|
#
1.16 |
|
07-Jul-2023 |
rillig |
tests/lint: merge duplicate tests for C11 _Atomic
|
#
1.15 |
|
28-Mar-2023 |
rillig |
lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
|
#
1.14 |
|
04-Jan-2023 |
rillig |
tests/lint: fix typo in comment
|
Revision tags: netbsd-10-base
|
#
1.13 |
|
22-Jun-2022 |
rillig |
lint: add quotes around placeholders for the remaining messages
Reword some of the messages slightly, exchanging brevity for clarity.
Message 138 is kept as-is, as it is not yet covered by any tests.
Message 240 is kep as-is, as it is unreachable.
|
#
1.12 |
|
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.11 |
|
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.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.17 |
|
07-Jul-2023 |
rillig |
lint: warn about function definitions without header declaration
The existing warning was only issued for function declarations, not for function definitions.
The interesting change in the tests is in msg_351.c. Many other tests use non-static functions due to their syntactic brevity. In these tests, the warning is disabled individually, to allow new functions to be added without generating warning 351.
|
#
1.16 |
|
07-Jul-2023 |
rillig |
tests/lint: merge duplicate tests for C11 _Atomic
|
#
1.15 |
|
28-Mar-2023 |
rillig |
lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
|
#
1.14 |
|
04-Jan-2023 |
rillig |
tests/lint: fix typo in comment
|
Revision tags: netbsd-10-base
|
#
1.13 |
|
22-Jun-2022 |
rillig |
lint: add quotes around placeholders for the remaining messages
Reword some of the messages slightly, exchanging brevity for clarity.
Message 138 is kept as-is, as it is not yet covered by any tests.
Message 240 is kep as-is, as it is unreachable.
|
#
1.12 |
|
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.11 |
|
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.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.15 |
|
28-Mar-2023 |
rillig |
lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
|
#
1.14 |
|
04-Jan-2023 |
rillig |
tests/lint: fix typo in comment
|
Revision tags: netbsd-10-base
|
#
1.13 |
|
22-Jun-2022 |
rillig |
lint: add quotes around placeholders for the remaining messages
Reword some of the messages slightly, exchanging brevity for clarity.
Message 138 is kept as-is, as it is not yet covered by any tests.
Message 240 is kep as-is, as it is unreachable.
|
#
1.12 |
|
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.11 |
|
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.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.14 |
|
04-Jan-2023 |
rillig |
tests/lint: fix typo in comment
|
Revision tags: netbsd-10-base
|
#
1.13 |
|
22-Jun-2022 |
rillig |
lint: add quotes around placeholders for the remaining messages
Reword some of the messages slightly, exchanging brevity for clarity.
Message 138 is kept as-is, as it is not yet covered by any tests.
Message 240 is kep as-is, as it is unreachable.
|
#
1.12 |
|
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.11 |
|
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.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.13 |
|
22-Jun-2022 |
rillig |
lint: add quotes around placeholders for the remaining messages
Reword some of the messages slightly, exchanging brevity for clarity.
Message 138 is kept as-is, as it is not yet covered by any tests.
Message 240 is kep as-is, as it is unreachable.
|
#
1.12 |
|
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.11 |
|
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.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.12 |
|
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.11 |
|
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.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.11 |
|
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.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.10 |
|
01-Aug-2021 |
rillig |
tests/lint: fix test c11_generic_expression on ILP32
These platforms don't provide __uint128_t, at least not in lint.
The exact data type does not matter in this test, it just has to be different from 'int'.
|
#
1.9 |
|
01-Aug-2021 |
rillig |
tests/lint: document why lint does not check _Generic selections
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.8 |
|
11-Jul-2021 |
rillig |
lint: make _Generic a primary-expression
C11 says so, and unless the _Generic expression was wrapped in parentheses, it was not possible before to use it as a function call expression.
|
#
1.7 |
|
11-Jul-2021 |
rillig |
tests/lint: demonstrate that _Generic must be a primary_expression
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|
#
1.6 |
|
28-Jun-2021 |
rillig |
lint: only accept assignment-expression in _Generic
That's what C11 says.
|
#
1.5 |
|
27-Jun-2021 |
rillig |
lint: fix parsing of _Generic selection expressions
Previously, lint accepted comma-expressions where only assignment-expressions are allowed.
This change does not make a difference in practice though since lint is usually only run on source code that properly compiles. Nevertheless, rather be precise and accurate since the grammar might some day be reused on less reliable input.
|
#
1.4 |
|
27-Jun-2021 |
rillig |
lint: fix type comparison in _Generic selection expressions
In the newly added test comma_expression, there were two distinct type objects for the tspec DOUBLE.
|
#
1.3 |
|
27-Jun-2021 |
rillig |
lint: fix result type of _Generic expressions
|
#
1.2 |
|
27-Jun-2021 |
rillig |
tests/lint: add test for _Generic with incompatible return types
|
#
1.1 |
|
27-Jun-2021 |
rillig |
lint: fix option -Ac11, add test for _Generic
Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later".
The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible.
|