The NetBSD Project

CVS log for src/tests/usr.bin/xlint/lint1/Attic/c11_generic_expression.exp

[BACK] Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.10
Fri Jun 17 20:23:58 2022 UTC (2 years, 6 months ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
FILE REMOVED
Changes since revision 1.9: +0 -0 lines
tests/lint: remove .exp files, as they have become redundant

Now that each lint1 test lists all generated diagnostics as 'expect'
comments, the information from the .exp files is no longer needed.  The
only information that gets lost is the order of the diagnostics, which
is mostly relevant for paired messages like 'inconsistent definition' +
'previous definition was here'.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Jan 15 14:22:03 2022 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
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.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Aug 3 18:44:33 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -1 lines
lint: add quotes around placeholder in message 214

function '%s' expects to return value

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Jul 11 20:37:21 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +0 -2 lines
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.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Jul 11 20:34:05 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -0 lines
tests/lint: demonstrate that _Generic must be a primary_expression

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Jun 27 21:30:46 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -1 lines
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.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Jun 27 21:16:40 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -0 lines
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.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Jun 27 20:47:13 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -4 lines
lint: fix result type of _Generic expressions

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Jun 27 19:59:23 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -2 lines
tests/lint: add test for _Generic with incompatible return types

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Jun 27 18:48:45 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
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.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>