CVS log for src/tests/usr.bin/xlint/lint1/Makefile
Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.142: download - view: text, markup, annotated - select for diffs
Sat Jun 8 09:09:20 2024 UTC (9 months, 2 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
HEAD
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +33 -1
lines
tests/lint: reorganize tests
Tests for a single working language construct don't usually need a
separate file, they can be grouped together, like in expr.c or gcc.c.
Revision 1.141: download - view: text, markup, annotated - select for diffs
Sun Apr 23 08:47:27 2023 UTC (23 months ago) by rillig
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +2 -2
lines
tests/lint: test command line parsing for message and query IDs
The parsing methods differ but shouldn't.
Revision 1.140: download - view: text, markup, annotated - select for diffs
Sun Feb 5 17:23:01 2023 UTC (2 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +2 -2
lines
tests/lint: fix source directory for looking up the .exp-ln files
Revision 1.139: download - view: text, markup, annotated - select for diffs
Sun Feb 5 16:11:56 2023 UTC (2 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -2
lines
tests/lint1: the redundantly listed files contained .exp-ln as well
Revision 1.138: download - view: text, markup, annotated - select for diffs
Sun Feb 5 15:11:19 2023 UTC (2 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +2 -2
lines
tests/lint: fix resolving of wildcards in builds from other directories
Revision 1.137: download - view: text, markup, annotated - select for diffs
Sun Feb 5 12:36:56 2023 UTC (2 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +2 -153
lines
tests/lint: remove redundancy from Makefile
The list of test files is already kept in distrib/sets/lists/tests/mi.
Revision 1.136: download - view: text, markup, annotated - select for diffs
Sun Feb 5 12:25:11 2023 UTC (2 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +1 -6
lines
tests/lint: remove redundant tests
The names of the tests were misleading: 'recursive' should have been
'nested', and the interesting topic in the 'cast' tests was not the cast
but the pointer dereference.
Revision 1.135: download - view: text, markup, annotated - select for diffs
Sun Jan 29 17:02:09 2023 UTC (2 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +1 -2
lines
tests/lint: merge tests for '>>'
Revision 1.134: download - view: text, markup, annotated - select for diffs
Sun Jan 22 17:17:25 2023 UTC (2 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +1 -3
lines
tests/lint: merge tests for declaration after statement
Revision 1.133: download - view: text, markup, annotated - select for diffs
Sat Jan 21 13:07:22 2023 UTC (2 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +2 -2
lines
lint: add support for the C11 type qualifier '_Atomic'
That keyword can be used as a type specifier as well, support for that
will be added later.
Revision 1.132: download - view: text, markup, annotated - select for diffs
Sat Jan 21 11:57:03 2023 UTC (2 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +3 -1
lines
tests/lint: test _Atomic, added in C11
Revision 1.131: download - view: text, markup, annotated - select for diffs
Sun Jan 15 00:53:19 2023 UTC (2 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -1
lines
tests/lint: add test for parsing sizeof expressions
Revision 1.130: download - view: text, markup, annotated - select for diffs
Wed Jan 4 05:25:08 2023 UTC (2 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +1 -2
lines
tests/lint: merge tests for ':?' with null pointer constant
Revision 1.129: download - view: text, markup, annotated - select for diffs
Tue Jul 5 22:50:41 2022 UTC (2 years, 8 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base,
netbsd-10-1-RELEASE,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +2 -1
lines
lint: add additional queries that are not enabled by default
In the last 18 months, several lint warnings have been made adjusted to
allow common usage patterns. For example, lint no longer warns about a
constant condition in the statement 'do { ... } while (false)' (message
161), as this pattern is well-known in statement-like macros, making it
unlikely that the 'false' is a mistake. Another example is casts
between unequal pointer types (message 247) for a few well-known
patterns that are unlikely to be bugs.
Occasionally, it is useful to query the code for patterns or events that
would not justify a warning. These patterns are modeled as predefined
queries that can be selected individually, in addition to and
independently of the existing warnings and errors.
New queries can be added as needed, in the same way as new warnings.
Queries that are deemed no longer used can be deactivated in the same
way as warnings that are no longer used.
As long as none of the queries is enabled, they produce a minimal
overhead of querying a single global variable. Computations that are
more expensive than a few machine instructions should be guarded by
any_query_enabled.
https://mail-index.netbsd.org/source-changes-d/2022/06/28/msg013716.html
ok christos@
Revision 1.128: download - view: text, markup, annotated - select for diffs
Fri Jun 17 20:31:56 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +3 -3
lines
tests/lint: move check-expect.lua to tests/lint1
It is only used for testing lint1, not for lint2 or xlint.
Revision 1.127: download - view: text, markup, annotated - select for diffs
Fri Jun 17 20:23:58 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +6 -108
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.126: download - view: text, markup, annotated - select for diffs
Thu Jun 16 21:24:41 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +2 -1
lines
tests/lint: add more details to messages in msg_200 until msg_299
Add some tests that were previously empty. Some other tests are still
empty.
Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu Jun 16 16:58:36 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +2 -1
lines
tests/lint: make expectation lines in the tests more detailed
This commit migrates msg_100 until msg_199.
Revision 1.124: download - view: text, markup, annotated - select for diffs
Fri Jun 10 18:29:01 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +3 -1
lines
tests/lint: fix test for loss of accuracy on ILP32 platforms
The test had been wrong since msg_132.c 1.14 from 2022-05-30.
Using 'unsigned long' in a test that was intended to behave the same on
ILP32 and LP64 was an accident. Use 'unsigned long long' instead, which
is 64-bits wide on all platforms supported by lint.
Move the test about conversion from 'long' to 'int' to the
platform-specific test files.
Noticed by martin@ on powerpc.
Revision 1.123: download - view: text, markup, annotated - select for diffs
Thu May 12 20:49:21 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +2 -2
lines
tests/lint: add more tests for __alignof__
Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu May 12 00:09:44 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +2 -1
lines
tests/lint: adjust tests to reflect missing support of __alignof__
The change in lex.c 1.129 attempted to add support for __alignof, in
addition to the existing support for __alignof__. It failed by removing
support for __alignof__, while allowing the plain 'alignof' instead.
Revision 1.121: download - view: text, markup, annotated - select for diffs
Thu Apr 28 21:38:38 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -1
lines
lint: revert resolving grammar conflicts for labeled statements
Restore the grammar rule for labeled_statement as it was before cgram.y
1.400 from 2022-04-24. This allows labels with attributes again. Fix
the wrong interpretation in the tests; the attributes belong to the
label, not to the statement.
Today in the morning, when I thought that the change in cgram.y 1.400
were innocent, I accidentally ran lint only with the options '-Sw' but
forgot the option '-g' for GNU mode. Without that option, the token
'__attribute__' is unknown, which unsurprisingly leads to lots of syntax
errors, and these didn't change with that commit. The actual change was
only visible in GNU mode.
Revision 1.120: download - view: text, markup, annotated - select for diffs
Sat Apr 16 20:18:52 2022 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +7 -7
lines
lint: fix instructions for adding a new test
Revision 1.119: download - view: text, markup, annotated - select for diffs
Fri Apr 8 21:29:29 2022 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +8 -2
lines
lint: remove unused message 70, add some more tests
Revision 1.118: download - view: text, markup, annotated - select for diffs
Tue Apr 5 23:09:19 2022 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +2 -2
lines
tests/lint: add tests for a few early messages
Revision 1.117: download - view: text, markup, annotated - select for diffs
Mon Dec 20 19:48:05 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +3 -1
lines
tests/lint: test excess braces around initializers
Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Dec 16 11:00:15 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +2 -1
lines
tests/lint: remove generated shell program on 'make clean'
Revision 1.115: download - view: text, markup, annotated - select for diffs
Mon Dec 6 23:20:26 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +3 -1
lines
tests/lint: demonstrate wrong warning for __builtin_alloca
Revision 1.114: download - view: text, markup, annotated - select for diffs
Sat Oct 30 22:04:42 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +2 -2
lines
lint: warn if an enum name is used for mismatched array access
This helps to keep the enum definition and the straight-forward
implementation of a to_string or name function in sync.
The test for message 241 had to be adjusted because of exactly this bug.
That test defined a bit mask enum but accessed it like a value enum
type.
Revision 1.113: download - view: text, markup, annotated - select for diffs
Sun Sep 26 03:17:59 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +19 -1
lines
tests/lint: add tests for platform characteristics
Running lint in usr.bin/make on i386 fails due to this warning:
cond.c(800): warning: argument #3 is converted from 'unsigned char' to
'unsigned int' due to prototype [259]
This warning only occurred on i386 but not on sparc or x86_64. Try to
reproduce the test situation in platform_int.
The platform code in t_integration.sh was not strict enough, it didn't
check for multiple conditions, such as in msg_132_ilp32. That test was
only supposed to run on ILP32 platforms where size_t is unsigned int. It
also ran on sparc, even though size_t is long there.
Revision 1.112: download - view: text, markup, annotated - select for diffs
Mon Sep 13 22:09:06 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +3 -1
lines
tests/lint: add more tests for direct-abstract-declarator
Lint's grammar in this area differs a lot from the grammar in C99. GCC's
parser has a long comment about special cases in this area. It's tricky
to even parse these type names correctly, let alone assign them the
correct types, that's why it needs more tests before trying to refactor
that code.
Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun Sep 12 16:28:45 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +2 -2
lines
lint: add more details to error about redeclaration
Message 27 is triggered by several conditions. The one triggered by
register_vget in sbin/fsck_lfs/vnode.c needs more details than the
others.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Fri Sep 10 19:40:18 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -1
lines
tests/lint: test line number tracking with \v and \f
Revision 1.109: download - view: text, markup, annotated - select for diffs
Fri Sep 3 22:44:09 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -1
lines
tests/lint: test GCC builtins for overflow in strict bool mode
Seen in inetd.c.
Revision 1.108: download - view: text, markup, annotated - select for diffs
Tue Aug 31 18:59:26 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +3 -1
lines
tests/lint: add test for prototype conversions in C90
The purpose of warning 259 is to find function calls that differ in the
ABI. The warning's original purpose was not to warn about lossy
conversions, that's just a side effect.
Warning 259 had been implemented before C99 was published, which is more
than 20 years ago. In the meantime, almost all code has migrated to
using function prototypes. With the default lint flags from NetBSD's
<sys.mk>, it would rather make sense to focus on lossy conversions now.
To prepare for potentially upcoming differences in lint's C90 and C99
modes, clone the test now as far as possible. The test for C90 mode is
smaller than for C99 mode, since 'long long' was not available back
then.
Revision 1.107: download - view: text, markup, annotated - select for diffs
Wed Aug 25 22:04:52 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +3 -1
lines
tests/lint: test conversion from long long to intptr_t on ilp32
Seen in usr.bin/make/var.c:1608.
Revision 1.106: download - view: text, markup, annotated - select for diffs
Sun Aug 22 20:56:51 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +3 -1
lines
tests/lint: demonstrate wrong constant folding in strict bool mode
Found while investigating wrong constant folding in default mode.
Revision 1.105: download - view: text, markup, annotated - select for diffs
Thu Aug 19 20:32:33 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +3 -1
lines
tests/lint: test folding of constant expressions
Since November 2001, there is a comment above the function 'fold' that
suggests there are a few bugs concerning overflow detection. Add some
first 'proper regression tests' to prove these bugs.
Revision 1.104: download - view: text, markup, annotated - select for diffs
Mon Aug 16 20:11:03 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +5 -1
lines
tests/lint: test arithmetic promotions and enums
Revision 1.103: download - view: text, markup, annotated - select for diffs
Mon Aug 9 20:07:24 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +2 -2
lines
lint: warn about 'char * = strchr(const char *, int)'
Found in findcc.c, there are about 25 other instances of this
incongruency in the whole source tree.
For more examples of functions from the C Standard Library that
implicitly remove the 'const' qualifier from an argument, see the C++
include file 'cstring'.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Thu Aug 5 06:34:43 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +3 -1
lines
tests/lint: test emitting 128-bit integer types for lint2
Revision 1.101: download - view: text, markup, annotated - select for diffs
Tue Aug 3 20:34:23 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -1
lines
tests/lint: test GCC extension for casting to union type
Revision 1.100: download - view: text, markup, annotated - select for diffs
Tue Aug 3 18:03:54 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -1
lines
tests/lint: test casting a struct to another struct
Revision 1.99: download - view: text, markup, annotated - select for diffs
Sun Aug 1 16:29:28 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +3 -1
lines
tests/lint: test the usual arithmetic conversions in traditional C
Revision 1.98: download - view: text, markup, annotated - select for diffs
Sun Aug 1 13:31:49 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +3 -1
lines
tests/lint: test the usual arithmetic conversions
The function 'balance' does not mention __uint128_t and nevertheless
works as expected. Need to investigate further.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Sun Jul 25 22:03:42 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +3 -1
lines
tests/lint: cover every code line in the grammar
Revision 1.96: download - view: text, markup, annotated - select for diffs
Sun Jul 25 17:27:07 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +3 -1
lines
tests/lint: test declarators with attributes
Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Jul 25 10:57:38 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +3 -1
lines
tests/lint: demonstrate missing support for GCC typeof
Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Jul 25 09:29:20 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +5 -1
lines
tests/lint: test parse errors in statements
These errors are really unrealistic. Most parse errors that occur in
statements are already handled elsewhere and continue with the next
semicolon.
The tests had to be split into two separate files because lint assumes
that after the 5th parse error, it does not make sense to continue this
translation unit.
Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Jul 25 08:42:28 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -1
lines
tests/lint: test parsing of type_name
Revision 1.92: download - view: text, markup, annotated - select for diffs
Thu Jul 15 21:00:05 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +5 -1
lines
tests/lint: cover more edge cases in the parser
Revision 1.91: download - view: text, markup, annotated - select for diffs
Thu Jul 15 19:51:29 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +3 -1
lines
tests/lint: test struct declarations
Revision 1.90: download - view: text, markup, annotated - select for diffs
Thu Jul 15 17:09:08 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +3 -1
lines
tests/lint: test precedence of operators
Revision 1.89: download - view: text, markup, annotated - select for diffs
Wed Jul 14 20:39:13 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +5 -1
lines
tests/lint: add several tests for edge cases in the grammar
Revision 1.88: download - view: text, markup, annotated - select for diffs
Tue Jul 13 19:38:10 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -1
lines
tests/lint: test binary integer literals and underscores
Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Jul 13 18:50:16 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +8 -2
lines
tests/lint: take archsubdir from usr.bin/xlint/Makefile.inc
This fixes the tests on the various ARM platforms where the platform
name does not correspond to MACHINE_ARCH, such as earmv7hf.
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Jul 11 19:24:42 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +1 -2
lines
lint: support __attribute__((hot))
The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.
Revision 1.85: download - view: text, markup, annotated - select for diffs
Sun Jul 11 18:58:13 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +3 -1
lines
tests/lint: test dangling else
Revision 1.84: download - view: text, markup, annotated - select for diffs
Sat Jul 10 18:25:57 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +3 -1
lines
tests/lint: test declarations
Revision 1.83: download - view: text, markup, annotated - select for diffs
Sat Jul 10 09:24:26 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +5 -1
lines
tests/lint: add more tests for covering the grammar
Revision 1.82: download - view: text, markup, annotated - select for diffs
Fri Jul 9 20:20:03 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -1
lines
tests/lint: add test for unrealistic edge cases in declarations
The example code for triggering these grammar rules looks completely
contrived. Even if lint had not implemented these cases, hopefully
nobody would have ever noticed.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Jul 8 05:18:49 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +7 -1
lines
tests/lint: add tests for C90 mode and malformed declarations
In the grammar, 148 lines are still uncovered by the tests. The
untested parts are mostly obscure declarations and a few parse errors.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Jul 6 17:33:07 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +13 -1
lines
tests/lint: add tests for GCC __attribute__
Before fixing the wrong handling of __attribute__ that is demonstrated
at the end of gcc_attribute.c, ensure that the attribute handling works
in the most basic cases.
Lint currently accepts __attribute__ in more places than it should.
This leads to some ambiguities in the grammar.
Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Jul 4 20:22:31 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +3 -1
lines
test/lint: demonstrate wrong warnings for 128-bit shifts
Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Jul 4 13:14:54 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +2 -1
lines
lint: remove remaining support for lvalue casts
These had been GCC extensions until GCC 3.4, they were removed in GCC
4.0.
Revision 1.77: download - view: text, markup, annotated - select for diffs
Sun Jul 4 08:50:26 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -1
lines
tests/lint: re-enable test c99_bool_strict_suppressed
It had been disabled accidentally in the previous commit.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Jul 4 08:19:06 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +1 -3
lines
lint: remove outdated assertion
Since err.c 1.12 from 2000-07-06, lint allows to suppress individual
error messages. Suppressed error messages do not increment nerr.
Keeping nerr at 0 had triggered the assertion.
Revision 1.75: download - view: text, markup, annotated - select for diffs
Sun Jul 4 07:50:53 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -1
lines
tests/lint: add test for suppressing errors in strict bool mode
Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Jul 3 19:31:22 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -1
lines
tests/lint: fix test for character comparison on macppc
On macppc, char == unsigned char, which generates one more warning than
on platforms where char == signed char.
Revision 1.73: download - view: text, markup, annotated - select for diffs
Fri Jul 2 21:52:36 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -1
lines
tests/lint: add test for array subscripts in C99 initialization
Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Jun 29 21:33:09 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +1 -2
lines
lint: fix wrong warning about out-of-range value '\xff' for char
This only affects platforms where char has the same representation as
unsigned char.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Jun 29 13:58:13 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -1
lines
tests/lint: add test that only runs where char == unsigned char
There a 4 regular NetBSD builds where lint is activated. All these
builds run on platforms where char == signed char.
The official test runs from https://releng.netbsd.org/test-results.html
mostly have char == signed char as well.
However, lint behaves differently on platforms with char == unsigned
char. On these platforms, a simple "char ch = '\xff'" leads to the
bogus warning that "conversion of 'int' to 'char' is out of range".
Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Jun 29 09:44:25 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +4 -1
lines
tests/lint: add 'make accept' to update the expected output
Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Jun 29 09:19:17 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +5 -1
lines
tests/lint: add tests for ILP32 platforms
Previously, all tests for lint had to produce the exact same output, no
matter which platform they ran on. This differs from practical needs
since lint is intended to produce different results depending on whether
the platform is ILP32 or LP64.
Examples for these are type conversions and the widths of the integer
types during lexical analysis.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Jun 27 19:10:29 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +2 -2
lines
lint: require C11 for _Generic
This does not have any effect in practice since the option -g
(originally meant for GCC extensions to the C standards) implicitly
allows all features from C11, since err.c 1.111 from 2021-04-14.
Since the default lint flags for NetBSD builds include the option -g,
this allows all C11 features.
Currently it is not possible to say "allow GNU extensions but not C11".
Revision 1.67: download - view: text, markup, annotated - select for diffs
Sun Jun 27 18:48:45 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -1
lines
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.
Revision 1.66: download - view: text, markup, annotated - select for diffs
Sun Jun 27 09:22:31 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +2 -16
lines
tests/lint: rename expected .ln file to .exp-ln
This way, the hack for suffixes is no longer needed.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Sun Jun 20 18:09:48 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +3 -1
lines
tests/lint: test syntax error in initialization using designator
This test prepares the upcoming refactoring of the grammar.
Revision 1.64: download - view: text, markup, annotated - select for diffs
Sat Jun 19 20:25:58 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -1
lines
lint: fix endless loop on unfinished comment at EOF
Found using afl.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Jun 19 19:59:02 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +3 -1
lines
lint: fix assertion after malformed for loop
Found using afl.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Jun 19 19:49:15 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -1
lines
lint: fix assertion failure in struct with unnamed member
Found using afl.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Sat Jun 19 15:51:11 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -1
lines
lint: fix crash in malformed initialization
Revision 1.60: download - view: text, markup, annotated - select for diffs
Sat Jun 19 08:30:08 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +13 -1
lines
tests/lint: add test cases for lexical analysis
Revision 1.55.2.1: download - view: text, markup, annotated - select for diffs
Mon May 31 22:15:24 2021 UTC (3 years, 9 months ago) by cjep
Branches: cjep_staticlib_x
Diff to: previous 1.55: preferred, colored; next MAIN 1.56: preferred, colored
Changes since revision 1.55: +4 -3
lines
sync with head
Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue May 25 19:22:18 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
CVS tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -2
lines
tests/lint: make test d_gcc_extension platform-independent
That test was intended to test the keywords '__extension__' and
'__typeof'. The GCC builtin functions were just a side-effect.
These built-in functions generated error messages on platforms such as
amd64 where sizeof(long double) != sizeof(double), but not on others
such as sparc.
The current infrastructure for the lint tests cannot handle tests with
platform-dependent outcome.
Revision 1.58: download - view: text, markup, annotated - select for diffs
Sun May 16 11:11:37 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +2 -2
lines
lint: add more specific warning for bit-field of type plain 'int'
Previously, declaring a bit-field of type plain 'int' resulted in this
warning:
warning: nonportable bit-field type 'int' [34]
This warning was too unspecific to be actionable, and until yesterday it
didn't even include the type. In order to allow this warning to be
understood and properly fixed, describe the actual nonportability more
precisely:
warning: bit-field of type plain 'int' has
implementation-defined signedness [344]
Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat May 15 19:12:14 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -1
lines
lint: warn about unreachable case labels for '&&'
See octeon_gmxreg.h 1.2 from 2020-06-18 for an example, where
RXN_RX_INBND_SPEED was cleaned up without adjusting the corresponding
code in octeon_gmx.c.
Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri May 14 21:14:55 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +2 -1
lines
tests/lint: test bitwise mismatch in switch statement
Revision 1.55: download - view: text, markup, annotated - select for diffs
Sun May 2 21:22:09 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
CVS tags: cjep_staticlib_x-base
Branch point for: cjep_staticlib_x
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -1
lines
tests/lint: add test for bit-field types in GCC mode
Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun May 2 20:44:46 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -1
lines
tests/lint: demonstrate missing support for __packed __aligned
Revision 1.53: download - view: text, markup, annotated - select for diffs
Fri Apr 30 23:49:36 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -1
lines
tests/lint: add very basic tests for GCC __attribute__
Revision 1.52: download - view: text, markup, annotated - select for diffs
Thu Apr 22 22:43:26 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -1
lines
tests/lint: add test for typeof after statement
Found by christos@.
Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Apr 21 14:04:26 2021 UTC (3 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +1 -0
lines
Put things back, emit.ln it was meant to be there.
Revision 1.50: download - view: text, markup, annotated - select for diffs
Wed Apr 21 13:41:42 2021 UTC (3 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +1 -2
lines
remove emit.ln; looks like an accident and breaks the build.
Revision 1.49: download - view: text, markup, annotated - select for diffs
Wed Apr 21 13:26:16 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +5 -1
lines
tests/lint: fix the hack for emit.ln to also work if MKUPDATE != "no"
Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Apr 20 23:30:35 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -2
lines
tests/lint: fix inconsistent operator for emit.ln
The build failed with:
nbmake[8]: "/.../src/share/mk/bsd.files.mk" line 47:
Inconsistent operator for /.../emit.ln
Revision 1.47: download - view: text, markup, annotated - select for diffs
Tue Apr 20 21:20:24 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +11 -1
lines
tests/lint1: fix build error "must name an existing directory"
The build failed with this error message:
x86_64--netbsd-install: the last argument (/.../emit.ln) must
name an existing directory
The cause for this message was that ${DESTDIR}/.../emit.ln has
${DESTDIR}/.../emit.c as implicit target, which is kind of correct but
unintended in this case. Because of this, the command 'install' was run
like this:
install ${NETBSDSRCDIR}/.../emit.ln ${DESTDIR}/.../emit.c \
${DESTDIR}/.../emit.ln
Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Apr 18 23:05:26 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2
lines
tests/lint: record all files from FILES in distrib/sets/lists/tests/mi
Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Apr 18 23:02:16 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -2
lines
tests/lint: add emit.ln to the release files
Revision 1.44: download - view: text, markup, annotated - select for diffs
Sun Apr 18 20:02:56 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -1
lines
lint: test emitting of symbol information in the .ln files
Even though the new test is quite large, it didn't find any bugs in the
code. The only thing I'm unsure about is why static functions are
exported as well, since they are supposed to be local to the translation
unit.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Apr 17 20:36:17 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -1
lines
tests/lint: demonstrate assertion failure in initialization
Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Apr 14 18:27:11 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -2
lines
lint: add test for newly added message about static array size
Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Apr 9 21:07:39 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -1
lines
tests/lint: demonstrate wrong lint warning about complex variables
Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu Apr 8 22:18:27 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -1
lines
lint: in code from included files, print stack trace
Previously, the standard NetBSD build generated several lint warnings in
lhash.h from OpenSSL, without providing any hint as to which file
actually included that header. In cases like these, lint now interprets
the line number information in the preprocessor output from GCC to
reconstruct the exact include path to the file in question.
The program check-expect.lua had to be rewritten almost completely since
it assumed that all diagnostics would come from the main file. In all
existing tests, this was true, but these tests did not cover all cases
that occurred in practice. Now it records the complete location of the
diagnostic instead of just the line number.
Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Apr 5 02:05:47 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -2
lines
lint: warn about for wrong type cast in argument to ctype.h functions
The argument to most of the functions from <ctype.h> "shall either be
representable as an 'unsigned char' or shall equal the value of the
macro EOF".
When confronted with the infamous warning 'array subscript has type
char', there are enough programmers who don't know the background of
that warning and thus fix it in a wrong way. Neither GCC nor Clang
explain its warning to target these programmers.
Both GCC and Clang warn about 'array subscript has type char', but they
ignore the other requirements of the <ctype.h> functions, even though
these are in the C standard library.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94182
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
https://stackoverflow.com/a/60696378
Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Apr 2 17:25:04 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -1
lines
tests/lint: prevent typo from tree.c 1.264 from happening again
Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Mar 28 14:01:50 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -2
lines
lint: remove wrong warning about wrong initializer type
The following code is valid:
int valid = {{{ 3 }}};
C90 3.5.7 and C99 6.7.8 both say that the "initializer for a scalar
shall be a single expression, optionally enclosed in braces". They
don't put any upper bound on the amount of braces, not even in the
"Translation limits" section.
Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Mar 23 21:19:08 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +3 -1
lines
tests/lint: test initialization using string literals
The errors in line 74 and 75 of the test are wrong. Everything is fine
there. The bug lies in init_array_using_string, try to see if you can
spot it, neither GCC 9.3.0 nor Clang 8.0.1 could.
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Mar 7 19:42:54 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -2
lines
lint: in strict C mode, warn about initialization with '[a ... b]'
https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html
Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Feb 28 22:12:16 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -1
lines
lint: fix null pointer dereference on parse error
Fixes PR bin/22119.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Feb 28 20:17:14 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -1
lines
lint: add test to demonstrate that PR bin/20264 has been fixed
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Feb 21 08:05:51 2021 UTC (4 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -1
lines
lint: add another test for C99 initializers
Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Feb 19 12:28:56 2021 UTC (4 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2
lines
lint: warn about mismatch in getopt handling
Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Jan 17 23:00:41 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +3 -1
lines
lint: add more tests for system headers in strict bool mode
Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Jan 14 22:18:14 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -2
lines
lint: add tests for newly added messages for strict bool mode
Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Jan 10 18:06:38 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -1
lines
lint: add test for triggering assertion failures in lint1
Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Jan 10 17:43:46 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -1
lines
lint: add test for treating _Bool as non-scalar type
This strict mode is not yet implemented. The plan is to use it for
usr.bin/make, to get rid of the many possible variants of defining the
Boolean type in make.h. These variants did find some bugs, but not
reliably so. Using static analysis seems more promising for this.
In an early stage of developing this test, lint1 crashed in the enum
definition in line 213, where the node for the '?:' had been NULL. This
can happen in other situations as well, such as with syntax errors, but
these should be rare, as lint is usually only run if the compiler has
accepted the source code. Still, there should not be any assertion
failures while running lint1.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Jan 10 11:24:42 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -1
lines
lint: demonstrate wrong handling of conversion to _Bool
Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Jan 2 10:22:42 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -1
lines
lint: add a test for each message produced by lint1
Having a test for each message ensures that upcoming refactorings don't
break the basic functionality. Adding the tests will also discover
previously unknown bugs in lint.
The tests ensure that every lint message can actually be triggered, and
they demonstrate how to do so. Having a separate file for each test
leaves enough space for documenting historical anecdotes, rationale or
edge cases, keeping them away from the source code.
The interesting details of this commit are in Makefile and
t_integration.sh. All other files are just auto-generated.
When running the tests as part of ATF, they are packed together as a
single test case. Conceptually, it would have been better to have each
test as a separate test case, but ATF quickly becomes very slow as soon
as a test program defines too many test cases, and 50 is already too
many. The time complexity is O(n^2), not O(n) as one would expect.
It's the same problem as in tests/usr.bin/make, which has over 300 test
cases as well.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Jan 1 16:50:47 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -1
lines
lint: demonstrate bug in handling of nested C9X struct initializers
Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Jan 1 01:07:08 2021 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -1
lines
lint: fix segmentation fault when checking returned enum types (211)
Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Dec 31 18:51:28 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -1
lines
lint: check that in "if (cond)", cond is scalar
Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Dec 30 13:15:07 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +17 -1
lines
lint: add test for old style function arguments
Revision 1.20: download - view: text, markup, annotated - select for diffs
Mon Dec 28 12:47:39 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -1
lines
lint1: add forgotten tests
Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Dec 28 11:19:01 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -1
lines
lint1: enable test cvt_constant
This test had never been enabled. In t_integration.sh 1.3 from
2014-04-17 it was supposed to be enabled, but due to a line continuation
backslash, the words "test_case check_valid" ended up as the description
of the previous test, cvt_in_ternary.
While here, add the expected test output for d_struct_init_nested to
FILES.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Dec 28 10:22:21 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -1
lines
lint1: add test for initializing nested structs
Discovered in var.c 1.774 from 2020-12-28.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Dec 28 09:58:56 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +9 -2
lines
lint: for tests with output, ensure that the output matches
Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Dec 28 09:57:14 2020 UTC (4 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -4
lines
lint: sort tests by name
Revision 1.13.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:13 2017 UTC (7 years, 11 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13: +3 -1
lines
Sync with HEAD
Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:58:02 2017 UTC (8 years ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +3 -1
lines
Sync with HEAD
Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Mar 6 21:02:47 2017 UTC (8 years ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
phil-wifi-base,
phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
phil-wifi-20190609,
phil-wifi,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-compat-merge-20190127,
pgoyette-compat-base,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
pgoyette-compat,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
netbsd-8-base,
netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
netbsd-8,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
is-mlppp-base,
is-mlppp,
bouyer-socketcan-base1
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -1
lines
add builtin_offsetof
Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Mar 6 12:00:27 2017 UTC (8 years ago) by christos
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -1
lines
add a test for a typeof cast
Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Aug 19 10:21:50 2016 UTC (8 years, 7 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
localcount-20160914,
bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -1
lines
Add union cast test
Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Aug 18 14:45:56 2016 UTC (8 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -1
lines
new test for struct that only has anon members, and that the size of struct
is computer right.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Oct 14 16:32:55 2015 UTC (9 years, 5 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-base,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726
Branch point for: pgoyette-localcount
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -1
lines
Add an anonymous struct test
Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Jul 29 18:26:15 2015 UTC (9 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -1
lines
new test
Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Jul 28 18:05:19 2015 UTC (9 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -1
lines
new c99 init test found by xorg's Iconify.c
Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Jul 1 15:36:44 2015 UTC (9 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -1
lines
new test.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon May 11 17:21:32 2015 UTC (9 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -1
lines
add one more test
Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Apr 3 21:37:26 2015 UTC (9 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -1
lines
add test for typename as a function param
Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Nov 20 21:18:47 2014 UTC (10 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -1
lines
test for c99 flexible packed arrays
Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Nov 20 20:52:15 2014 UTC (10 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -1
lines
Add one more test
Revision 1.1.4.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:53 2014 UTC (10 years, 7 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +4 -0
lines
Rebase to HEAD as of a few days ago.
Revision 1.2.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:57:37 2014 UTC (10 years, 7 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2: +4 -1
lines
Rebase.
Revision 1.1.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:42:24 2014 UTC (10 years, 10 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.1.2.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.2: +5 -1
lines
sync with head.
for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Apr 17 18:34:44 2014 UTC (10 years, 11 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9,
tls-maxphys-base,
tls-earlyentropy-base,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -1
lines
add more tests
Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Feb 4 08:08:59 2014 UTC (11 years, 1 month ago) by njoly
Branches: MAIN
CVS tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -1
lines
Handle another declaration after statement case for lint in c99 mode.
Add the corresponding testcase.
Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:09:22 2012 UTC (12 years, 11 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.1: +51 -0
lines
sync with head
Revision 1.1.2.1
Sat Mar 17 16:33:15 2012 UTC (13 years ago) by yamt
Branches: yamt-pagecache
FILE REMOVED
Changes since revision 1.1: +0 -51
lines
file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Mar 17 16:33:15 2012 UTC (13 years ago) by jruoho
Branches: MAIN
CVS tags: yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
agc-symver-base,
agc-symver
Branch point for: yamt-pagecache,
tls-maxphys
Deprecate tests/util.
CVSweb <webmaster@jp.NetBSD.org>