Home | History | Annotate | only in /src/tests/usr.bin
History log of /src/tests/usr.bin
RevisionDateAuthorComments
 1.43 18-Jan-2025  rillig tests/gcov: demonstrate wrong coverage report after vfork/exec

Discovered in usr.bin/make, function Cmd_Exec.

The coverage test I ran on 2024-07-13 was still good. I don't remember
the exact version of NetBSD-current I was running back then.

With NetBSD-current from 2025-01-17, gcov does not report full coverage
data after a vfork/exec call. Running the test program inside ktrace
shows that after a vfork call, the child process writes its coverage data
back, probably right before the exec call, but the parent process
doesn't.

Running a child process through system(3) is not affected; there,
posix_spawn is used instead of vfork/exec.
 1.42 12-Oct-2024  riastradh ftp(1): Add test for custom HTTP header fields.

Based on a patch from Sunil Nimmagadda <sunil@nimmagadda.net>.

PR bin/58581: ftp(1) should allow specifying header fields in http
requests
 1.41 02-Sep-2024  ozaki-r tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
 1.40 14-Mar-2024  rillig branches: 1.40.2;
tests/stat: test the left-aligned and right-aligned 'S' format
 1.39 25-Jan-2024  riastradh mtree(8): Test the installed sets.

Except etc and xetc, which likely won't match for reasons that aren't
great, like etc including empty log files which in an installed
system have probably changed.

This test will probably fail, but we should make sure it doesn't!

PR misc/57877
 1.38 26-Aug-2023  rillig tests/usr.bin/error: add basic tests for several error message styles
 1.37 21-Jul-2022  kre branches: 1.37.2;
Add ATF tests for realpath(1)

Note that realpath can act differently for root than for other users
(where an ordinary user will see EACCESS root just barrels right through).

The tests adapt themselves, when run as root, less error cases can be
tested than when run as some other user.
 1.36 22-May-2022  rillig tests/compress: demonstrate truncation of target file

Reported by Giorgos Keramidas in PR#19722.
 1.35 12-Oct-2021  nia Fix release builds with MKARGON2=yes

This changes argon2 from a separately built library into a private
dependency of libcrypt and removes the argon2(1) utility (we already
have pwhash(1)). Giving libcrypt more library dependencies
complicates things (e.g. libcrypt is a dependency of openssl).
pthreads support gets disabled in argon2 for similar reasons.

For testing argon2, we rely on the libcrypt test suite.
 1.34 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.33 03-Jul-2020  jruoho Add a check for PR bin/54692.
 1.32 27-Jun-2020  jruoho Add a test case for PR kern/53767.
 1.31 24-Jun-2020  jruoho Also install new tests.
 1.30 17-Jan-2020  christos new tests for libarchive
 1.29 14-Oct-2019  jhigh adding argon2 tests
 1.28 05-Oct-2019  jhigh adding full scheme comparison to libcrypt:crypt and pwhash tests
 1.27 04-Apr-2019  kamil Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.
 1.26 05-Sep-2018  kre Add ATF tests for printf(1)

Two new test programs, one for the version of printf in /bin/sh
and one for the command /usr/bin/printf (t_builtin and t_command)

Each test program has 28 test cases (the same in each) of which
currently 27 pass, and 1 is skipped.

See the test scripts themselves for more information.
 1.25 14-May-2017  kamil branches: 1.25.8; 1.25.10;
Add new c++ ATF tests in usr.bin/c++: t_hello

This is a copy of t_hello from usr.bin/cc.

Added tests:
- hello
- hello_pic
- hello_pie
- hello32

These tests do not use c++ runtime library functions.

Protect these tests with MKCXX.
 1.24 21-Feb-2017  kre branches: 1.24.2;
PR bin/50934

Add a test program for the bug described in this PR.
This is the first pkill/pgrep/prenice test (more would be good!)

This test has been confirmed to work once the bug described in the PR
has been fixed, so the test is not marked "expected to fail" even
though initially that is what should happen.

Note: the test cana also fail if the system running the tests happens
to be running processes with names that match the patterns searched for
by the test, other than the test program itself. This is expected to be
unlikely.
 1.23 02-Jan-2017  christos branches: 1.23.2;
mixerctl tests from Charlotte Koch
 1.22 22-Oct-2016  abhinav Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.21 08-Apr-2016  gson branches: 1.21.2;
Add regression tests for some past gdb bugs.
 1.20 14-Nov-2014  uebayasi Minimal linker script test.
 1.19 07-Jan-2014  gson Add some minimal tests of vmstat(1), to serve as regression tests
for PR bin/44518.
 1.18 10-Aug-2013  dholland Add tests for tr, including an xfail one for PR 48113.
 1.17 20-Nov-2012  agc descend into netpgpverify test directory too
 1.16 22-Jul-2012  joerg branches: 1.16.2;
Add basic regression test for nbperf(1)
 1.15 06-Jun-2012  martin Add a basic test for infocmp - this would have cought todays terminfo
lossage (PR lib/46553).
 1.14 18-May-2012  jruoho Add a test case for PR kern/46463. From Richard Hansen.
 1.13 20-Mar-2012  jruoho Add regression tests for PR bin/12424, PR bin/12316, and PR bin/14253,
all fixed long time ago.
 1.12 19-Mar-2012  jruoho Add regression tests for PR bin/2642 and PR bin/23836, both fixed long ago.
 1.11 18-Mar-2012  jruoho Add a case for PR bin/44973.
 1.10 18-Mar-2012  jruoho Add a test case for PR bin/28126. Does not fail with GNU sed.
 1.9 17-Mar-2012  jruoho Deprecate tests/toolchain.
 1.8 17-Mar-2012  jruoho Deprecate tests/util.
 1.7 10-Mar-2012  christos PR/46155: Miguel Pi�eiro Jr: awk RS handling is broken. Add the test cases
from the PR.
 1.6 30-May-2011  pgoyette branches: 1.6.4;
Descend into mkdep to catch its test
 1.5 03-May-2011  jruoho Add a test case for PR bin/26453.
 1.4 03-May-2011  jruoho Add a test for PR bin/41880.
 1.3 03-May-2011  jruoho Verify that PR bin/42628 is no longer an issue.
 1.2 10-Mar-2011  pooka add tests for shmif_dumpbus(1)
 1.1 03-Feb-2011  pooka branches: 1.1.2;
commit works better when you cvs add first
 1.1.2.2 08-Feb-2011  bouyer Sync with HEAD
 1.1.2.1 03-Feb-2011  bouyer file Makefile was added on branch bouyer-quota2 on 2011-02-08 19:01:37 +0000
 1.6.4.5 22-May-2014  yamt 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")
 1.6.4.4 16-Jan-2013  yamt sync with (a bit old) head
 1.6.4.3 30-Oct-2012  yamt sync with head
 1.6.4.2 23-May-2012  yamt sync with head.
 1.6.4.1 17-Apr-2012  yamt sync with head
 1.16.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.2.1 25-Feb-2013  tls resync with head
 1.21.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.21.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.21.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.23.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.24.2.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.25.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.10.1 10-Jun-2019  christos Sync with HEAD
 1.25.8.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.37.2.2 13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #970):

tests/usr.bin/Makefile: revision 1.42
usr.bin/ftp/ruserpass.c: revision 1.34
usr.bin/ftp/main.c: revision 1.130
usr.bin/ftp/ssl.c: revision 1.17
usr.bin/ftp/main.c: revision 1.131
usr.bin/ftp/ssl.c: revision 1.18
usr.bin/ftp/main.c: revision 1.132
usr.bin/ftp/ssl.c: revision 1.19
usr.bin/ftp/main.c: revision 1.133
distrib/sets/lists/tests/mi: revision 1.1342
usr.bin/ftp/ftp.1: revision 1.151
usr.bin/ftp/ftp.1: revision 1.152
usr.bin/ftp/progressbar.c: revision 1.25
usr.bin/ftp/ftp.1: revision 1.153
usr.bin/ftp/progressbar.c: revision 1.26
usr.bin/ftp/ftp.1: revision 1.155
usr.bin/ftp/ftp.1: revision 1.156
usr.bin/ftp/fetch.c: revision 1.239
usr.bin/ftp/ftp.1: revision 1.157
usr.bin/ftp/ftp.1: revision 1.158
usr.bin/ftp/ftp.1: revision 1.159
usr.bin/ftp/ftp_var.h: revision 1.87
etc/mtree/NetBSD.dist.tests: revision 1.208
usr.bin/ftp/ftp_var.h: revision 1.88
usr.bin/ftp/ftp_var.h: revision 1.89
usr.bin/ftp/cmds.c: revision 1.142
usr.bin/ftp/util.c: revision 1.168
usr.bin/ftp/cmds.c: revision 1.143
tests/usr.bin/ftp/custom_headers.sh: revision 1.1
usr.bin/ftp/ssl.c: revision 1.20
usr.bin/ftp/complete.c: revision 1.48
tests/usr.bin/ftp/Makefile: revision 1.1
tests/usr.bin/ftp/t_custom_headers.sh: revision 1.1
usr.bin/ftp/fetch.c: revision 1.240
usr.bin/ftp/fetch.c: revision 1.241
usr.bin/ftp/ftp.c: revision 1.176
usr.bin/ftp/ftp.c: revision 1.177
(all via patch)

ftp(1): wording and formatting improvements

Fix grammar issue with "Support values" reported in private mail.
Document all file transfer types in "type" and cross-reference that.
Consistency fixes in describing file transfer parameters and types.

Fix some mandoc -Tlint issues (except "useless macro: Tn").

Add -b <buflen> to specify the buffer size.

ftp: bump FTPBUFLEN from 4kB to 16kB
sourceforge.net returns a 5kB content-security-policy.
Analyzed by mlelstv@ who reports usual limits are between 4kB and 48kB.
default is now 16K

ftp: improve -b documentation

Order -b bufsize in the synopsis.

Document the actual default value.

ftp: improve units used in comments and errors
Use "KiB" instead of "K" in errors.
Clarify related comments.

pass some lint.

PR/58581: Sunil Nimmagadda: Add flag to allow specifying extra http header
fields.

ftp(1): Nix trailing whitespace in man page.
No functional change intended.

PR bin/58581: ftp(1) should allow specifying header fields in http requests
fix markup (h -> H), explain about multiple headers, fix usage (from RVP)

Don't forget the dot, use the intended macro name (I think),
and improve the wording a little. (All related to the -H option.)
ftp(1): Add test for custom HTTP header fields.

Based on a patch from Sunil Nimmagadda.

PR bin/58581: ftp(1) should allow specifying header fields in http
requests
 1.37.2.1 05-Sep-2024  martin Pull up following revision(s) (requested by ozaki-r in ticket #817):

tests/usr.bin/Makefile: revision 1.41 (patch)
distrib/sets/lists/base/mi: revision 1.1350 (patch)
usr.bin/shmif_pcapin/shmif_pcapin.1: revision 1.1
distrib/sets/lists/man/mi: revision 1.1787 (patch)
distrib/sets/lists/debug/mi: revision 1.447 (patch)
tests/usr.bin/shmif_pcapin/d_pcap.out.bz2.uue: revision 1.1
sys/rump/net/lib/libshmif/if_shmem.c: revision 1.88
etc/mtree/NetBSD.dist.tests: revision 1.207
sys/rump/net/lib/libshmif/shmifvar.h: revision 1.12
usr.bin/shmif_pcapin/shmif_pcapin.c: revision 1.1
usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/t_basic.sh: revision 1.1
usr.bin/Makefile: revision 1.240
distrib/sets/lists/tests/mi: revision 1.1335 (patch)
tests/usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/d_pcap.in.bz2.uue: revision 1.1

shmif: export LOCK_* definitions
They will be used by upcoming shmif_pcapin.

Add shmif_pcapin(1) utility program

It can send any frames that are stored in a pcap(3) file format to
shmif(4) Ethernet interface via the bus of it. If you want to write
some tests for networking with rump kernels and the tests need to send
frames that are difficult to generate by stock programs, shmif_pcapin
can be helpful.

The author of shmif_pcapin is k-goda@IIJ and the man page is written
by ozaki-r.

tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
distrib, etc: install shmif_pcapin and its tests
 1.40.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 11-Mar-2012  jruoho branches: 1.2.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1 10-Mar-2012  christos PR/46155: Miguel Pi�eiro Jr: awk RS handling is broken. Add the test cases
from the PR.
 1.2.2.2 17-Apr-2012  yamt sync with head
 1.2.2.1 11-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_assign_NF.awk was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_assign_NF.in was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_assign_NF.out was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_big_regexp.awk was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_big_regexp.in was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_big_regexp.out was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_end1.awk was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_end1.in was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_end1.out was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_end2.awk was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_end2.in was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_end2.out was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_period.awk was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_period.in was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.3 19-Mar-2012  jruoho branches: 1.3.2;
As noted by christos@ in rev. 1.4 to t_awk.sh, the "period" test has been
broken all along. Fix expected output (tested on Linux, GNU awk 1.3.3).
 1.2 17-Mar-2012  christos The problem has been fixed and the test is broken. awk always uses the
C locale for LC_NUMERIC.
 1.1 11-Mar-2012  jruoho Move the existing tests from util/awk to usr.bin/awk.
 1.3.2.2 17-Apr-2012  yamt sync with head
 1.3.2.1 19-Mar-2012  yamt file d_period.out was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_string1.awk was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_string1.out was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_tolower.awk was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_tolower.in was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_tolower.out was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_toupper.awk was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_toupper.in was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.1 11-Mar-2012  jruoho branches: 1.1.2;
Move the existing tests from util/awk to usr.bin/awk.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 11-Mar-2012  yamt file d_toupper.out was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.7 26-Jun-2020  jruoho Reference PRs consistently.
 1.6 19-Jan-2019  christos add a range and a repeat regex test.
 1.5 10-Dec-2012  christos branches: 1.5.28; 1.5.30;
add a test case for PR/47306
 1.4 17-Mar-2012  christos branches: 1.4.2; 1.4.4;
The problem has been fixed and the test is broken. awk always uses the
C locale for LC_NUMERIC.
 1.3 11-Mar-2012  jruoho Move the existing tests from util/awk to usr.bin/awk.
 1.2 10-Mar-2012  christos fix typos.
 1.1 10-Mar-2012  christos PR/46155: Miguel Pi�eiro Jr: awk RS handling is broken. Add the test cases
from the PR.
 1.4.4.1 25-Feb-2013  tls resync with head
 1.4.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.4.2.2 17-Apr-2012  yamt sync with head
 1.4.2.1 17-Mar-2012  yamt file t_awk.sh was added on branch yamt-pagecache on 2012-04-17 00:09:16 +0000
 1.5.30.1 10-Jun-2019  christos Sync with HEAD
 1.5.28.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_basename.sh was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.3 07-May-2012  wiz Adapt to repository move of dist from external/bsd/bzip2 to
external/bsd/bzip2/dist.
 1.2 07-May-2012  wiz Finish move of bzip2 from dist/bzip2 to external/bsd/bzip2.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.3 23-May-2012  yamt sync with head.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_bzip2.sh was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.12 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.11 29-Jan-2019  mgorny branches: 1.11.2;
Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.10 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.9 02-May-2018  kamil branches: 1.9.2;
Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.8 11-Apr-2018  kamil Import new C and C++ ATF tests for ASan

Add new tests:
- tests/usr.bin/cc/t_asan_poison.sh
- tests/usr.bin/c++/t_asan_poison.sh

These tests verify the following build options:
- regular
- profile
- pic
- pie
- compat32
- (static unsupported)

These tests verify whether ASan code can include compiler and sanitizer
specific header: <sanitizer/asan_interface.h>. The testing code checks
the ASAN_POISON_MEMORY_REGION() functionality, poisoning valid memory and
asserting that it triggers expected failure.

Patch submitted by <Siddharth Muralee>
 1.7 04-Apr-2018  kamil Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

This is part two patch, adding the remaining C++ changes.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.6 04-Apr-2018  kamil Correct a small regression typo in usr.bin/c++ ATF tests

TESTS_SH= changed to TESTS_SH+=
 1.5 04-Apr-2018  kamil Sort entries in ATF tests in tests/usr.bin/c++/Makefile

No functional change intended.
 1.4 24-Mar-2018  kamil Add new C++ ATF tests

Add new variations for existing C++ tests:
- Static
- Profile+32-bit
- PIC+32-bit
- PIC+Profile
- PIC+Profile+32-bit

All tests pass for NetBSD/amd64:
- t_cxxruntime
- t_hello
- t_static_destructor

+--------------------------------------------------------------+
| Options | cxxruntime | hello | static_destructor |
+--------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Passed | Passed | Passed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Passed | Passed | Passed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Passed | Passed | Passed |
| PIC+Profile+32-bit | Passed | Passed | Passed |
+--------------------------------------------------------------+

Add new C++11 std::call_once tests:
- t_call_once
- t_call_once2

Add new C++11 test with pthread_once(3) and C++ lambda:
- t_pthread_once

All tests with the profile option for std::call_once and
pthread_once(3) are marked as expected failure (NetBSD/amd64).

Results for *_once*:
+------------------------------------------------------------+
| Options | call_once | call_once2 | pthread_once |
+------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Failed | Failed | Failed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Failed | Failed | Failed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Failed | Failed | Failed |
| PIC+Profile+32-bit | Failed | Failed | Failed |
+------------------------------------------------------------+

Long term there is an option to refacotr the framework for C and C++ tests,
in order to reduce code duplication.

Patches sent by Yang Zheng <tomsun.0.7@gmail.com>
 1.3 14-May-2017  kamil branches: 1.3.2; 1.3.10;
Add new ATF C++ tests in usr.bin/c++: t_static_destructor

These tests are cloned from t_cxxruntime and check proper order of destructor
calls. They must be reported in reverse order of constructor completion.

Added tests:
- static_destructor
- static_destructor_pic
- static_destructor_pie
- static_destructor32

This test file replaces src/regress/usr.bin/c++/static_destructor.
 1.2 14-May-2017  kamil Add new ATF C++ tests in usr.bin/c++

These tests are cloned from t_hello and use c++ runtime basic functions.

Added tests:
- hello
- hello_pic
- hello_pie
- hello32
 1.1 14-May-2017  kamil Add new c++ ATF tests in usr.bin/c++: t_hello

This is a copy of t_hello from usr.bin/cc.

Added tests:
- hello
- hello_pic
- hello_pie
- hello32

These tests do not use c++ runtime library functions.

Protect these tests with MKCXX.
 1.3.10.4 21-May-2018  pgoyette Sync with HEAD
 1.3.10.3 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.3.10.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.3.10.1 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.3.2.2 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.3.2.1 14-May-2017  pgoyette file Makefile was added on branch prg-localcount2 on 2017-05-19 00:22:59 +0000
 1.9.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.2.1 10-Jun-2019  christos Sync with HEAD
 1.11.2.1 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 12-Oct-2021  skrll asan is supported on aarch64
 1.2 29-Jan-2019  mgorny branches: 1.2.2;
Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.1 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2.2.2 10-Jun-2019  christos Sync with HEAD
 1.2.2.1 29-Jan-2019  christos file asan_common.subr was added on branch phil-wifi on 2019-06-10 22:10:11 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

This is part two patch, adding the remaining C++ changes.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_double_free.sh was added on branch pgoyette-compat on 2018-04-07 04:12:20 +0000
 1.4 07-Aug-2023  rin t_asan_global_buffer_overflow: Avoid ODR Violation for pic variants

Common symbol triggers ODR (One Definition Rule) Violation correctly,
instead of Global Buffer Overflow.

XXX
Add test for odr_violation.
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

This is part two patch, adding the remaining C++ changes.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_global_buffer_overflow.sh was added on branch pgoyette-compat on 2018-04-07 04:12:20 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

This is part two patch, adding the remaining C++ changes.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_heap_overflow.sh was added on branch pgoyette-compat on 2018-04-07 04:12:20 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

This is part two patch, adding the remaining C++ changes.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_off_by_one.sh was added on branch pgoyette-compat on 2018-04-07 04:12:20 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 11-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Import new C and C++ ATF tests for ASan

Add new tests:
- tests/usr.bin/cc/t_asan_poison.sh
- tests/usr.bin/c++/t_asan_poison.sh

These tests verify the following build options:
- regular
- profile
- pic
- pie
- compat32
- (static unsupported)

These tests verify whether ASan code can include compiler and sanitizer
specific header: <sanitizer/asan_interface.h>. The testing code checks
the ASAN_POISON_MEMORY_REGION() functionality, poisoning valid memory and
asserting that it triggers expected failure.

Patch submitted by <Siddharth Muralee>
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.1.2.1 11-Apr-2018  pgoyette file t_asan_poison.sh was added on branch pgoyette-compat on 2018-04-16 02:00:10 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

This is part two patch, adding the remaining C++ changes.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_uaf.sh was added on branch pgoyette-compat on 2018-04-07 04:12:20 +0000
 1.7 16-Apr-2025  riastradh tests/usr.bin/*: Mark profiling tests xfail on riscv.

PR port-riscv/59301: riscv: missing MKPROFILE=yes support
 1.6 12-Jun-2022  skrll branches: 1.6.4;
Put the sprinkled -static in the right place, i.e. fix up previous.

Thanks to rillig for spotting my mistake.
 1.5 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.4 13-Oct-2020  rin Now, profiling works for GCC9 on aarch64{,eb}.

Note that it seems to work even for GCC8, according to log data of
official test runs, e.g.,

https://releng.netbsd.org/b5reports/evbarm-aarch64/2020/2020.09.01.15.45.20/test.log
 1.3 11-Feb-2020  riastradh Mark compilation with -pg as xfail on aarch64.

XXX file a PR to xref
 1.2 08-Jan-2019  christos this now works...
 1.1 24-Mar-2018  kamil branches: 1.1.2; 1.1.4;
Add new C++ ATF tests

Add new variations for existing C++ tests:
- Static
- Profile+32-bit
- PIC+32-bit
- PIC+Profile
- PIC+Profile+32-bit

All tests pass for NetBSD/amd64:
- t_cxxruntime
- t_hello
- t_static_destructor

+--------------------------------------------------------------+
| Options | cxxruntime | hello | static_destructor |
+--------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Passed | Passed | Passed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Passed | Passed | Passed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Passed | Passed | Passed |
| PIC+Profile+32-bit | Passed | Passed | Passed |
+--------------------------------------------------------------+

Add new C++11 std::call_once tests:
- t_call_once
- t_call_once2

Add new C++11 test with pthread_once(3) and C++ lambda:
- t_pthread_once

All tests with the profile option for std::call_once and
pthread_once(3) are marked as expected failure (NetBSD/amd64).

Results for *_once*:
+------------------------------------------------------------+
| Options | call_once | call_once2 | pthread_once |
+------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Failed | Failed | Failed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Failed | Failed | Failed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Failed | Failed | Failed |
| PIC+Profile+32-bit | Failed | Failed | Failed |
+------------------------------------------------------------+

Long term there is an option to refacotr the framework for C and C++ tests,
in order to reduce code duplication.

Patches sent by Yang Zheng <tomsun.0.7@gmail.com>
 1.1.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.2 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.1.2.1 24-Mar-2018  pgoyette file t_call_once.sh was added on branch pgoyette-compat on 2018-03-30 06:20:16 +0000
 1.6.4.1 02-Aug-2025  perseant Sync with HEAD
 1.8 29-Sep-2022  skrll toolchain/57033: usr.bin/c++/t_call_once2:call_once2_profile test case fails

Remove the -static flag I added because it doesn't fix anything and it
actually causes more problems.
 1.7 28-Sep-2022  skrll toolchain/57033: usr.bin/c++/t_call_once2:call_once2_profile test case fails

Revive a missing space.
 1.6 12-Jun-2022  skrll Put the sprinkled -static in the right place, i.e. fix up previous.

Thanks to rillig for spotting my mistake.
 1.5 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.4 07-May-2022  rin Bump timeout.
 1.3 04-Sep-2021  rin Fix typo to correctly initialize call_once2_pic_profile.
 1.2 15-May-2019  christos Add explanatory text
 1.1 24-Mar-2018  kamil branches: 1.1.2; 1.1.4;
Add new C++ ATF tests

Add new variations for existing C++ tests:
- Static
- Profile+32-bit
- PIC+32-bit
- PIC+Profile
- PIC+Profile+32-bit

All tests pass for NetBSD/amd64:
- t_cxxruntime
- t_hello
- t_static_destructor

+--------------------------------------------------------------+
| Options | cxxruntime | hello | static_destructor |
+--------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Passed | Passed | Passed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Passed | Passed | Passed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Passed | Passed | Passed |
| PIC+Profile+32-bit | Passed | Passed | Passed |
+--------------------------------------------------------------+

Add new C++11 std::call_once tests:
- t_call_once
- t_call_once2

Add new C++11 test with pthread_once(3) and C++ lambda:
- t_pthread_once

All tests with the profile option for std::call_once and
pthread_once(3) are marked as expected failure (NetBSD/amd64).

Results for *_once*:
+------------------------------------------------------------+
| Options | call_once | call_once2 | pthread_once |
+------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Failed | Failed | Failed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Failed | Failed | Failed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Failed | Failed | Failed |
| PIC+Profile+32-bit | Failed | Failed | Failed |
+------------------------------------------------------------+

Long term there is an option to refacotr the framework for C and C++ tests,
in order to reduce code duplication.

Patches sent by Yang Zheng <tomsun.0.7@gmail.com>
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.1.2.1 24-Mar-2018  pgoyette file t_call_once2.sh was added on branch pgoyette-compat on 2018-03-30 06:20:16 +0000
 1.8 16-Apr-2025  riastradh tests/usr.bin/*: Mark profiling tests xfail on riscv.

PR port-riscv/59301: riscv: missing MKPROFILE=yes support
 1.7 12-Jun-2022  skrll branches: 1.7.4;
Put the sprinkled -static in the right place, i.e. fix up previous.

Thanks to rillig for spotting my mistake.
 1.6 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.5 13-Oct-2020  rin Now, profiling works for GCC9 on aarch64{,eb}.

Note that it seems to work even for GCC8, according to log data of
official test runs, e.g.,

https://releng.netbsd.org/b5reports/evbarm-aarch64/2020/2020.09.01.15.45.20/test.log
 1.4 11-Feb-2020  riastradh Mark compilation with -pg as xfail on aarch64.

XXX file a PR to xref
 1.3 24-Mar-2018  kamil branches: 1.3.2;
Add new C++ ATF tests

Add new variations for existing C++ tests:
- Static
- Profile+32-bit
- PIC+32-bit
- PIC+Profile
- PIC+Profile+32-bit

All tests pass for NetBSD/amd64:
- t_cxxruntime
- t_hello
- t_static_destructor

+--------------------------------------------------------------+
| Options | cxxruntime | hello | static_destructor |
+--------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Passed | Passed | Passed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Passed | Passed | Passed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Passed | Passed | Passed |
| PIC+Profile+32-bit | Passed | Passed | Passed |
+--------------------------------------------------------------+

Add new C++11 std::call_once tests:
- t_call_once
- t_call_once2

Add new C++11 test with pthread_once(3) and C++ lambda:
- t_pthread_once

All tests with the profile option for std::call_once and
pthread_once(3) are marked as expected failure (NetBSD/amd64).

Results for *_once*:
+------------------------------------------------------------+
| Options | call_once | call_once2 | pthread_once |
+------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Failed | Failed | Failed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Failed | Failed | Failed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Failed | Failed | Failed |
| PIC+Profile+32-bit | Failed | Failed | Failed |
+------------------------------------------------------------+

Long term there is an option to refacotr the framework for C and C++ tests,
in order to reduce code duplication.

Patches sent by Yang Zheng <tomsun.0.7@gmail.com>
 1.2 14-May-2017  kamil branches: 1.2.2; 1.2.10;
Use more C++ sugar in t_cxxruntime (ATF test)
 1.1 14-May-2017  kamil Add new ATF C++ tests in usr.bin/c++

These tests are cloned from t_hello and use c++ runtime basic functions.

Added tests:
- hello
- hello_pic
- hello_pie
- hello32
 1.2.10.1 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.2.2.2 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.2.2.1 14-May-2017  pgoyette file t_cxxruntime.sh was added on branch prg-localcount2 on 2017-05-19 00:22:59 +0000
 1.3.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_fuzzer_oom.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_fuzzer_oom.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_fuzzer_simple.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_fuzzer_simple.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_fuzzer_timeout.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_fuzzer_timeout.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.8 16-Apr-2025  riastradh tests/usr.bin/*: Mark profiling tests xfail on riscv.

PR port-riscv/59301: riscv: missing MKPROFILE=yes support
 1.7 12-Jun-2022  skrll branches: 1.7.4;
Put the sprinkled -static in the right place, i.e. fix up previous.

Thanks to rillig for spotting my mistake.
 1.6 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.5 13-Oct-2020  rin Now, profiling works for GCC9 on aarch64{,eb}.

Note that it seems to work even for GCC8, according to log data of
official test runs, e.g.,

https://releng.netbsd.org/b5reports/evbarm-aarch64/2020/2020.09.01.15.45.20/test.log
 1.4 11-Feb-2020  riastradh Mark compilation with -pg as xfail on aarch64.

XXX file a PR to xref
 1.3 24-Mar-2018  kamil branches: 1.3.2;
Add new C++ ATF tests

Add new variations for existing C++ tests:
- Static
- Profile+32-bit
- PIC+32-bit
- PIC+Profile
- PIC+Profile+32-bit

All tests pass for NetBSD/amd64:
- t_cxxruntime
- t_hello
- t_static_destructor

+--------------------------------------------------------------+
| Options | cxxruntime | hello | static_destructor |
+--------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Passed | Passed | Passed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Passed | Passed | Passed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Passed | Passed | Passed |
| PIC+Profile+32-bit | Passed | Passed | Passed |
+--------------------------------------------------------------+

Add new C++11 std::call_once tests:
- t_call_once
- t_call_once2

Add new C++11 test with pthread_once(3) and C++ lambda:
- t_pthread_once

All tests with the profile option for std::call_once and
pthread_once(3) are marked as expected failure (NetBSD/amd64).

Results for *_once*:
+------------------------------------------------------------+
| Options | call_once | call_once2 | pthread_once |
+------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Failed | Failed | Failed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Failed | Failed | Failed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Failed | Failed | Failed |
| PIC+Profile+32-bit | Failed | Failed | Failed |
+------------------------------------------------------------+

Long term there is an option to refacotr the framework for C and C++ tests,
in order to reduce code duplication.

Patches sent by Yang Zheng <tomsun.0.7@gmail.com>
 1.2 18-May-2017  martin branches: 1.2.2; 1.2.10;
Add (currently failing) test cases for profiled programs.
 1.1 14-May-2017  kamil Add new c++ ATF tests in usr.bin/c++: t_hello

This is a copy of t_hello from usr.bin/cc.

Added tests:
- hello
- hello_pic
- hello_pie
- hello32

These tests do not use c++ runtime library functions.

Protect these tests with MKCXX.
 1.2.10.1 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.2.2.2 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.2.2.1 18-May-2017  pgoyette file t_hello.sh was added on branch prg-localcount2 on 2017-05-19 00:22:59 +0000
 1.3.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_allocated_memory.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_allocated_memory.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_check_mem.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_check_mem.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_free.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_free.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_heap.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_heap.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_partial_poison.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_partial_poison.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_poison.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_poison.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_realloc.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_realloc.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_shadow.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_shadow.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_stack.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_stack.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_unpoison.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_unpoison.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.7 16-Apr-2025  riastradh tests/usr.bin/*: Mark profiling tests xfail on riscv.

PR port-riscv/59301: riscv: missing MKPROFILE=yes support
 1.6 12-Jun-2022  skrll branches: 1.6.4;
Put the sprinkled -static in the right place, i.e. fix up previous.

Thanks to rillig for spotting my mistake.
 1.5 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.4 13-Oct-2020  rin Now, profiling works for GCC9 on aarch64{,eb}.

Note that it seems to work even for GCC8, according to log data of
official test runs, e.g.,

https://releng.netbsd.org/b5reports/evbarm-aarch64/2020/2020.09.01.15.45.20/test.log
 1.3 11-Feb-2020  riastradh Mark compilation with -pg as xfail on aarch64.

XXX file a PR to xref
 1.2 08-Jan-2019  christos This now works too.
 1.1 24-Mar-2018  kamil branches: 1.1.2; 1.1.4;
Add new C++ ATF tests

Add new variations for existing C++ tests:
- Static
- Profile+32-bit
- PIC+32-bit
- PIC+Profile
- PIC+Profile+32-bit

All tests pass for NetBSD/amd64:
- t_cxxruntime
- t_hello
- t_static_destructor

+--------------------------------------------------------------+
| Options | cxxruntime | hello | static_destructor |
+--------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Passed | Passed | Passed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Passed | Passed | Passed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Passed | Passed | Passed |
| PIC+Profile+32-bit | Passed | Passed | Passed |
+--------------------------------------------------------------+

Add new C++11 std::call_once tests:
- t_call_once
- t_call_once2

Add new C++11 test with pthread_once(3) and C++ lambda:
- t_pthread_once

All tests with the profile option for std::call_once and
pthread_once(3) are marked as expected failure (NetBSD/amd64).

Results for *_once*:
+------------------------------------------------------------+
| Options | call_once | call_once2 | pthread_once |
+------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Failed | Failed | Failed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Failed | Failed | Failed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Failed | Failed | Failed |
| PIC+Profile+32-bit | Failed | Failed | Failed |
+------------------------------------------------------------+

Long term there is an option to refacotr the framework for C and C++ tests,
in order to reduce code duplication.

Patches sent by Yang Zheng <tomsun.0.7@gmail.com>
 1.1.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.2 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.1.2.1 24-Mar-2018  pgoyette file t_pthread_once.sh was added on branch pgoyette-compat on 2018-03-30 06:20:16 +0000
 1.6.4.1 02-Aug-2025  perseant Sync with HEAD
 1.8 24-Sep-2025  rin t_static_destructor: pic: Appease GCC14 -Wreturn-type

by adding explicit `return 0;` to int functions.

Otherwise, GCC14 even emits `ud2` insn for amd64 with -O0!

Fixes pic variants of tests. pic_profile_32 test on amd64 still
crashes in rtld although...
 1.7 16-Apr-2025  riastradh tests/usr.bin/*: Mark profiling tests xfail on riscv.

PR port-riscv/59301: riscv: missing MKPROFILE=yes support
 1.6 12-Jun-2022  skrll branches: 1.6.4;
Put the sprinkled -static in the right place, i.e. fix up previous.

Thanks to rillig for spotting my mistake.
 1.5 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.4 13-Oct-2020  rin Now, profiling works for GCC9 on aarch64{,eb}.

Note that it seems to work even for GCC8, according to log data of
official test runs, e.g.,

https://releng.netbsd.org/b5reports/evbarm-aarch64/2020/2020.09.01.15.45.20/test.log
 1.3 11-Feb-2020  riastradh Mark compilation with -pg as xfail on aarch64.

XXX file a PR to xref
 1.2 24-Mar-2018  kamil branches: 1.2.2;
Add new C++ ATF tests

Add new variations for existing C++ tests:
- Static
- Profile+32-bit
- PIC+32-bit
- PIC+Profile
- PIC+Profile+32-bit

All tests pass for NetBSD/amd64:
- t_cxxruntime
- t_hello
- t_static_destructor

+--------------------------------------------------------------+
| Options | cxxruntime | hello | static_destructor |
+--------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Passed | Passed | Passed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Passed | Passed | Passed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Passed | Passed | Passed |
| PIC+Profile+32-bit | Passed | Passed | Passed |
+--------------------------------------------------------------+

Add new C++11 std::call_once tests:
- t_call_once
- t_call_once2

Add new C++11 test with pthread_once(3) and C++ lambda:
- t_pthread_once

All tests with the profile option for std::call_once and
pthread_once(3) are marked as expected failure (NetBSD/amd64).

Results for *_once*:
+------------------------------------------------------------+
| Options | call_once | call_once2 | pthread_once |
+------------------------------------------------------------+
| None | Passed | Passed | Passed |
| 32-bit | Passed | Passed | Passed |
| PIC | Passed | Passed | Passed |
| PIE | Passed | Passed | Passed |
| Profile | Failed | Failed | Failed |
| Static | Passed | Passed | Passed |
| Profile+32-bit | Failed | Failed | Failed |
| PIC+32-bit | Passed | Passed | Passed |
| PIC+Profile | Failed | Failed | Failed |
| PIC+Profile+32-bit | Failed | Failed | Failed |
+------------------------------------------------------------+

Long term there is an option to refacotr the framework for C and C++ tests,
in order to reduce code duplication.

Patches sent by Yang Zheng <tomsun.0.7@gmail.com>
 1.1 14-May-2017  kamil branches: 1.1.2; 1.1.10;
Add new ATF C++ tests in usr.bin/c++: t_static_destructor

These tests are cloned from t_cxxruntime and check proper order of destructor
calls. They must be reported in reverse order of constructor completion.

Added tests:
- static_destructor
- static_destructor_pic
- static_destructor_pie
- static_destructor32

This test file replaces src/regress/usr.bin/c++/static_destructor.
 1.1.10.1 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.1.2.2 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.1.2.1 14-May-2017  pgoyette file t_static_destructor.sh was added on branch prg-localcount2 on 2017-05-19 00:22:59 +0000
 1.2.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6.4.1 02-Aug-2025  perseant Sync with HEAD
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_data_race.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_data_race.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_heap_use_after_free.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_heap_use_after_free.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_lock_order_inversion.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_lock_order_inversion.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_locked_mutex_destroy.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_locked_mutex_destroy.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_signal_errno.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_signal_errno.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 16-Dec-2021  martin Remove bogus architecture detection voodo - tsan is not available
on most architectures, so just state it that way.
 1.4 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_thread_leak.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_thread_leak.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.8 24-May-2023  christos match the new compiler warning
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 16-Dec-2021  martin Remove bogus architecture detection voodo - tsan is not available
on most architectures, so just state it that way.
 1.4 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_vptr_race.sh was added on branch phil-wifi on 2020-04-13 08:05:32 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_vptr_race.sh was added on branch netbsd-9 on 2019-08-29 16:45:26 +0000
 1.4 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.3 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.2 04-May-2018  kamil branches: 1.2.2; 1.2.4;
Improve wording for non-native speakers of English

Improve wording in t_ubsan tests in for c++.

No functional change intended.

Follow the changed in cc/ by <martin>
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 04-May-2018  pgoyette file t_ubsan_int_add_overflow.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.4 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.3 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.2 04-May-2018  kamil branches: 1.2.2; 1.2.4;
Improve wording for non-native speakers of English

Improve wording in t_ubsan tests in for c++.

No functional change intended.

Follow the changed in cc/ by <martin>
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 04-May-2018  pgoyette file t_ubsan_int_divzero.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.4 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.3 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.2 04-May-2018  kamil branches: 1.2.2; 1.2.4;
Improve wording for non-native speakers of English

Improve wording in t_ubsan tests in for c++.

No functional change intended.

Follow the changed in cc/ by <martin>
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 04-May-2018  pgoyette file t_ubsan_int_neg_overflow.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.4 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.3 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.2 04-May-2018  kamil branches: 1.2.2; 1.2.4;
Improve wording for non-native speakers of English

Improve wording in t_ubsan tests in for c++.

No functional change intended.

Follow the changed in cc/ by <martin>
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 04-May-2018  pgoyette file t_ubsan_int_sub_overflow.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.5 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.4 16-Jul-2018  kamil Disable profile and compat 32-bit c++ sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.3 04-May-2018  kamil branches: 1.3.2; 1.3.4;
Improve wording for non-native speakers of English

Improve wording in t_ubsan tests in for c++.

No functional change intended.

Follow the changed in cc/ by <martin>
 1.2 04-May-2018  kamil Explain VLA in c++/t_ubsan_vla_out_of_bounds.sh (ATF test)

VLA - Variable Length Array

Requested by <martin>
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.3.4.1 10-Jun-2019  christos Sync with HEAD
 1.3.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.3.2.2 21-May-2018  pgoyette Sync with HEAD
 1.3.2.1 04-May-2018  pgoyette file t_ubsan_vla_out_of_bounds.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.2 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.1 29-Jan-2019  mgorny branches: 1.1.2;
Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 29-Jan-2019  christos file ubsan_common.subr was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.10 06-Oct-2025  riastradh libpthread: Test pthread_create link errors without -(l)pthread.

Prompted by:

PR lib/59685: libcrypto should not depend on libpthread
 1.9 18-Dec-2024  riastradh tests/usr.bin/cc: Add test for ctype(3) detection.

PR lib/58912: ctype(3) abuse detection fails for variable references
 1.8 18-Aug-2019  kamil branches: 1.8.10;
Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.7 09-Feb-2019  mrg branches: 1.7.2;
add very simple test that you can link -fopenmp.

currently fails, but should work soon...
 1.6 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.5 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.4 02-May-2018  kamil branches: 1.4.2;
Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.3 11-Apr-2018  kamil Import new C and C++ ATF tests for ASan

Add new tests:
- tests/usr.bin/cc/t_asan_poison.sh
- tests/usr.bin/c++/t_asan_poison.sh

These tests verify the following build options:
- regular
- profile
- pic
- pie
- compat32
- (static unsupported)

These tests verify whether ASan code can include compiler and sanitizer
specific header: <sanitizer/asan_interface.h>. The testing code checks
the ASAN_POISON_MEMORY_REGION() functionality, poisoning valid memory and
asserting that it triggers expected failure.

Patch submitted by <Siddharth Muralee>
 1.2 04-Apr-2018  kamil Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.32;
Deprecate tests/toolchain.
 1.1.32.3 21-May-2018  pgoyette Sync with HEAD
 1.1.32.2 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.1.32.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.4.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.2.1 10-Jun-2019  christos Sync with HEAD
 1.7.2.1 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.8.10.1 02-Aug-2025  perseant Sync with HEAD
 1.3 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.2 12-Oct-2021  skrll asan is supported on aarch64
 1.1 29-Jan-2019  mgorny branches: 1.1.2;
Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 29-Jan-2019  christos file asan_common.subr was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_double_free.sh was added on branch pgoyette-compat on 2018-04-07 04:12:21 +0000
 1.4 07-Aug-2023  rin t_asan_global_buffer_overflow: Avoid ODR Violation for pic variants

Common symbol triggers ODR (One Definition Rule) Violation correctly,
instead of Global Buffer Overflow.

XXX
Add test for odr_violation.
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_global_buffer_overflow.sh was added on branch pgoyette-compat on 2018-04-07 04:12:21 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_heap_overflow.sh was added on branch pgoyette-compat on 2018-04-07 04:12:21 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_off_by_one.sh was added on branch pgoyette-compat on 2018-04-07 04:12:21 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 11-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Import new C and C++ ATF tests for ASan

Add new tests:
- tests/usr.bin/cc/t_asan_poison.sh
- tests/usr.bin/c++/t_asan_poison.sh

These tests verify the following build options:
- regular
- profile
- pic
- pie
- compat32
- (static unsupported)

These tests verify whether ASan code can include compiler and sanitizer
specific header: <sanitizer/asan_interface.h>. The testing code checks
the ASAN_POISON_MEMORY_REGION() functionality, poisoning valid memory and
asserting that it triggers expected failure.

Patch submitted by <Siddharth Muralee>
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.1.2.1 11-Apr-2018  pgoyette file t_asan_poison.sh was added on branch pgoyette-compat on 2018-04-16 02:00:10 +0000
 1.3 29-Jan-2019  mgorny Move common ASAN test case code into asan_common.subr

Reviewed by <kamil>
 1.2 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.1 04-Apr-2018  kamil branches: 1.1.2; 1.1.4;
Add new ATF tests for Address Sanitzier (ASan)

Add new C and C++ tests:
- t_asan_double_free
- t_asan_global_buffer_overflow
- t_asan_heap_overflow
- t_asan_off_by_one
- t_asan_uaf

Each tests checks:
- regular build
- 32-bit
- PIC
- PIE
- profile

These tests require paxctl(8) to disable ASLR in order to work in a
predictable way. This is especially true for all !regular builds with
additional compiler flags.

There are no static variations of these tests as this mode is not supported
in upstream ASan.

Enable these tests on amd64 and i386.

Patch submitted by <Siddharth Muralee>
Additional polishing by myself.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 04-Apr-2018  pgoyette file t_asan_uaf.sh was added on branch pgoyette-compat on 2018-04-07 04:12:21 +0000
 1.1 18-Dec-2024  riastradh branches: 1.1.4;
tests/usr.bin/cc: Add test for ctype(3) detection.

PR lib/58912: ctype(3) abuse detection fails for variable references
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 18-Dec-2024  perseant file t_ctype_abuse.sh was added on branch perseant-exfatfs on 2025-08-02 05:58:12 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_fuzzer_oom.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_fuzzer_oom.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_fuzzer_simple.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_fuzzer_simple.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_fuzzer_timeout.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_fuzzer_timeout.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.13 16-Apr-2025  riastradh tests/usr.bin/*: Mark profiling tests xfail on riscv.

PR port-riscv/59301: riscv: missing MKPROFILE=yes support
 1.12 12-Jun-2022  skrll branches: 1.12.4;
Put the sprinkled -static in the right place, i.e. fix up previous.

Thanks to rillig for spotting my mistake.
 1.11 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.10 13-Oct-2020  rin Now, profiling works for GCC9 on aarch64{,eb}.

Note that it seems to work even for GCC8, according to log data of
official test runs, e.g.,

https://releng.netbsd.org/b5reports/evbarm-aarch64/2020/2020.09.01.15.45.20/test.log
 1.9 11-Feb-2020  riastradh Mark compilation with -pg as xfail on aarch64.

XXX file a PR to xref
 1.8 09-Feb-2019  mrg fix hello_profile's hello_profile_head function name.
 1.7 03-Sep-2018  maya amend test case to also check for -fprofile-generate
(clang also supports this flag)

PR toolchain/53567
 1.6 31-May-2017  martin branches: 1.6.8; 1.6.10;
In the -m32 test, additionally test profiled binaries.
 1.5 18-May-2017  martin Add (currently failing) test cases for profiled programs.
 1.4 13-May-2017  kamil Correct hellp_pic ATF test in usr.bin/cc

Drop "-dPIC", this is misspelled "-DPIC" option for libtool.
Enhance code example to be more pedantic.
 1.3 03-Apr-2016  gson branches: 1.3.6;
Fix typo
 1.2 21-Jul-2012  martin Add a test case that (if gcc supports it on the current arch) to compile
a PIE binary and see if we can run it.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/toolchain.
 1.1.2.3 30-Oct-2012  yamt sync with head
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_hello.sh was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.3.6.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.6.10.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6.10.1 10-Jun-2019  christos Sync with HEAD
 1.6.8.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12.4.1 02-Aug-2025  perseant Sync with HEAD
 1.2 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.1 09-Feb-2019  mrg branches: 1.1.2;
add very simple test that you can link -fopenmp.

currently fails, but should work soon...
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 09-Feb-2019  christos file t_libgomp.sh was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_allocated_memory.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_allocated_memory.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_check_mem.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_check_mem.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_free.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_free.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_heap.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_heap.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_partial_poison.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_partial_poison.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_poison.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_poison.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_realloc.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_realloc.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_shadow.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_shadow.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_stack.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_stack.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.4 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.3 02-Jun-2022  skrll Trailing whitespace
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_msan_unpoison.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_msan_unpoison.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.1 06-Oct-2025  riastradh libpthread: Test pthread_create link errors without -(l)pthread.

Prompted by:

PR lib/59685: libcrypto should not depend on libpthread
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_data_race.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_data_race.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_heap_use_after_free.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_heap_use_after_free.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_lock_order_inversion.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_lock_order_inversion.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_locked_mutex_destroy.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_locked_mutex_destroy.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_signal_errno.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_signal_errno.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.7 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.6 02-Jun-2022  skrll Trailing whitespace
 1.5 17-Nov-2020  gson Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.
 1.4 15-Sep-2020  martin Simplify test requirements: we only build tsan for amd64 currently.
 1.3 14-Sep-2020  kamil Enable TSan tests for GCC and >32bit address space environments
 1.2 23-Aug-2019  kamil branches: 1.2.2; 1.2.6;
Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.1 18-Aug-2019  kamil Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 23-Aug-2019  martin file t_tsan_thread_leak.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2.2.2 29-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #120):

tests/usr.bin/cc/t_msan_poison.sh: revision 1.1
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.1
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/cc/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/c++/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.1
distrib/sets/lists/tests/mi: revision 1.819
tests/usr.bin/cc/t_fuzzer_oom.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/cc/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_msan_heap.sh: revision 1.1
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/cc/Makefile: revision 1.8
tests/usr.bin/c++/t_msan_free.sh: revision 1.1
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.1
tests/usr.bin/c++/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_unpoison.sh: revision 1.2
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_heap_use_after_free.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/cc/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/t_msan_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.1
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.1
tests/usr.bin/c++/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.1
tests/usr.bin/cc/t_msan_shadow.sh: revision 1.2
tests/usr.bin/cc/t_msan_partial_poison.sh: revision 1.2
tests/usr.bin/c++/t_msan_allocated_memory.sh: revision 1.2
tests/usr.bin/cc/t_msan_free.sh: revision 1.1
tests/usr.bin/cc/t_msan_free.sh: revision 1.2
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.1
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.1
tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh: revision 1.2
tests/usr.bin/c++/t_fuzzer_timeout.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.1
tests/usr.bin/cc/t_msan_heap.sh: revision 1.2
tests/usr.bin/cc/t_tsan_thread_leak.sh: revision 1.2
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/cc/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.1
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.1
tests/usr.bin/c++/t_tsan_lock_order_inversion.sh: revision 1.2
tests/usr.bin/c++/Makefile: revision 1.12
tests/usr.bin/c++/t_tsan_signal_errno.sh: revision 1.2
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.1
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.1
tests/usr.bin/cc/t_msan_realloc.sh: revision 1.2
tests/usr.bin/c++/t_tsan_vptr_race.sh: revision 1.2
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.1
tests/usr.bin/c++/t_msan_shadow.sh: revision 1.2
tests/usr.bin/c++/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.1
tests/usr.bin/c++/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.1
tests/usr.bin/c++/t_tsan_data_race.sh: revision 1.2
tests/usr.bin/cc/t_fuzzer_simple.sh: revision 1.2
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.1
tests/usr.bin/cc/t_msan_stack.sh: revision 1.1
tests/usr.bin/c++/t_msan_check_mem.sh: revision 1.2
tests/usr.bin/cc/t_msan_stack.sh: revision 1.2
tests/usr.bin/cc/t_msan_allocated_memory.sh: revision 1.1

Add ATF c and c++ tests for TSan, MSan, libFuzzer

These tests require Clang/LLVM 7 or newer on NetBSD.

Contributed by Yang Zheng during GSoC 2018.

-

Define target_not_supported_body() in TSan, MSan and libFuzzer tests
 1.2.2.1 23-Aug-2019  martin file t_tsan_thread_leak.sh was added on branch netbsd-9 on 2019-08-29 16:45:25 +0000
 1.5 09-Feb-2019  mrg add $NetBSD$ tags.
 1.4 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.3 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.2 04-May-2018  martin branches: 1.2.2; 1.2.4;
Use more formal speech in messages
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 04-May-2018  pgoyette file t_ubsan_int_add_overflow.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.5 09-Feb-2019  mrg add $NetBSD$ tags.
 1.4 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.3 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.2 04-May-2018  martin branches: 1.2.2; 1.2.4;
Use more formal speech in messages
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 04-May-2018  pgoyette file t_ubsan_int_divzero.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.5 09-Feb-2019  mrg add $NetBSD$ tags.
 1.4 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.3 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.2 04-May-2018  martin branches: 1.2.2; 1.2.4;
Use more formal speech in messages
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 04-May-2018  pgoyette file t_ubsan_int_neg_overflow.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.5 09-Feb-2019  mrg add $NetBSD$ tags.
 1.4 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.3 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.2 04-May-2018  martin branches: 1.2.2; 1.2.4;
Use more formal speech in messages
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 04-May-2018  pgoyette file t_ubsan_int_sub_overflow.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.6 09-Feb-2019  mrg add $NetBSD$ tags.
 1.5 29-Jan-2019  mgorny Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.4 16-Jul-2018  kamil Disable profile and compat 32-bit tests cc sanitizer tests

These tests are known to be faulty. These fatures aren't ready.
They tend to break to unrelated changes to the codebase and require.

Base Clang and GCC are in general dated to use with sanitizers as these
features are being fixed on HEAD versions of both compilers (mostly Clang).
 1.3 04-May-2018  kamil branches: 1.3.2; 1.3.4;
Explain VLA in t_ubsan_vla_out_of_bounds.sh (ATF test)

VLA - Variable Length Array

Requested by <martin>
 1.2 04-May-2018  martin Use more formal speech in messages
 1.1 02-May-2018  kamil Add new ATF Undefined Behavior Sanitizer tests

Add new cc and c++ tests to check whether UBSan works.
These tests are prepared for GCC (in base) and Clang (with external patches).

Enable these tests for all ports by default, just verify whether we are
using GCC/Clang or a compatible compiler.

Add five equivalent C and C++ tests:
- Integer addition overflow
- Integer divide by zero
- Integer negation overflow
- Integer subtraction overflow
- VLA out of bounds

All tests pass on NetBSD/amd64.

Patch submitted by <Harry Pantazis>
Minor cleanup by <myself>
 1.3.4.1 10-Jun-2019  christos Sync with HEAD
 1.3.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.3.2.2 21-May-2018  pgoyette Sync with HEAD
 1.3.2.1 04-May-2018  pgoyette file t_ubsan_vla_out_of_bounds.sh was added on branch pgoyette-compat on 2018-05-21 04:36:18 +0000
 1.2 12-Jun-2022  skrll Sprinkle "-static" when using "-pg" as profiling only works with static and
the gcc specs are currently broken.

PR/56876: hppa: "cc -pg" fails with "undefined reference to `mprotect'"
 1.1 29-Jan-2019  mgorny branches: 1.1.2;
Move common UBSAN test case code into ubsan_common.subr

Reviewed by <kamil>
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 29-Jan-2019  christos file ubsan_common.subr was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.1 19-Mar-2012  jruoho branches: 1.1.2;
Add regression tests for PR bin/2642 and PR bin/23836, both fixed long ago.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 19-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 19-Mar-2012  jruoho branches: 1.1.2;
Add regression tests for PR bin/2642 and PR bin/23836, both fixed long ago.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 19-Mar-2012  yamt file t_cmp.sh was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 01-Nov-2020  christos Add unit-tests for col from FreeBSD
 1.1 22-May-2022  rillig tests/compress: demonstrate truncation of target file

Reported by Giorgos Keramidas in PR#19722.
 1.4 22-May-2022  rillig uncompress: if the source is broken, don't delete the target

Fixes the second half of PR bin/19722, reported by Giorgos Keramidas.
 1.3 22-May-2022  rillig uncompress: if the source doesn't exist, don't touch the target

Fixes part of PR bin/19722, reported by Giorgos Keramidas.
 1.2 22-May-2022  rillig tests/compress: extend tests for compressing and uncompressing

For PR bin/19722.
 1.1 22-May-2022  rillig tests/compress: demonstrate truncation of target file

Reported by Giorgos Keramidas in PR#19722.
 1.3 08-Mar-2020  christos Add an ifdef test
 1.2 29-Oct-2014  uebayasi branches: 1.2.16;
config(1): Check minimal config(1) output files
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.2.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_deffs_redef was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.2 09-Mar-2020  christos branches: 1.2.2;
One more test from uwe.
 1.1 08-Mar-2020  christos Add an ifdef test
 1.2.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.2.1 09-Mar-2020  martin file d_ifdef was added on branch phil-wifi on 2020-04-08 14:09:13 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_loop was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_loop2 was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 29-Oct-2014  uebayasi config(1): Check minimal config(1) output files
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_no_pseudo was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_postponed_orphan was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_pseudo_parent was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_shadow_instance was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.12 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.11 21-Oct-2021  andvar fix various typos, mainly in comments, but also in man pages and log messages.
 1.10 09-Mar-2020  christos update expected result
 1.9 08-Mar-2020  christos Add an ifdef test
 1.8 27-Aug-2016  christos branches: 1.8.14;
adjust to current config format
 1.7 04-Oct-2015  uebayasi Catch up with the current, generated Makefile format.
 1.6 20-Nov-2014  uebayasi Handle warning messages.
 1.5 31-Oct-2014  uebayasi config(1): Briefly test ioconf.c output
 1.4 31-Oct-2014  uebayasi config(1), config(5): Introduce "select"

o Introduce a new selection directive "select" to select an attribute (as a
module) and its dependencies.
o Support "no select" too.
o Stop abusing "options" to select an attribute.
o Bump config(1) version.
 1.3 31-Oct-2014  uebayasi config(1): Test undefined options behavior

- Test selecting an undefined options.
- Test negating an undefined options (failing).
- Fix typos in previous.
 1.2 29-Oct-2014  uebayasi config(1): Check minimal config(1) output files
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_config.sh was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.8.14.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:17 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.2 29-Oct-2014  uebayasi config(1): Check minimal config(1) output files
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile.regress was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file files.regress was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file std.regress was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.2 20-Dec-2014  uebayasi config(1): Fix test breakage

Now config(1) checks the content of $S/conf/Makefile.kern.inc. Install it
into config(1) test directory to fix test. Noticed by Martin Husemann.
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.12;
Deprecate tests/util.
 1.1.12.1 15-Mar-2015  snj Pull up following revision(s) (requested by bouyer in ticket #596):
distrib/sets/lists/tests/mi: revision 1.604
tests/usr.bin/config/support/conf/Makefile: revision 1.2
tests/usr.bin/config/support/conf/Makefile.kern.inc: revision 1.1
config(1): Fix test breakage
Now config(1) checks the content of $S/conf/Makefile.kern.inc. Install it
into config(1) test directory to fix test. Noticed by Martin Husemann.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 20-Dec-2014  uebayasi branches: 1.1.2;
config(1): Fix test breakage

Now config(1) checks the content of $S/conf/Makefile.kern.inc. Install it
into config(1) test directory to fix test. Noticed by Martin Husemann.
 1.1.2.2 15-Mar-2015  snj Pull up following revision(s) (requested by bouyer in ticket #596):
distrib/sets/lists/tests/mi: revision 1.604
tests/usr.bin/config/support/conf/Makefile: revision 1.2
tests/usr.bin/config/support/conf/Makefile.kern.inc: revision 1.1
config(1): Fix test breakage
Now config(1) checks the content of $S/conf/Makefile.kern.inc. Install it
into config(1) test directory to fix test. Noticed by Martin Husemann.
 1.1.2.1 20-Dec-2014  snj file Makefile.kern.inc was added on branch netbsd-7 on 2015-03-15 23:01:46 +0000
 1.3 31-Oct-2014  uebayasi config(1): Briefly test ioconf.c output
 1.2 31-Oct-2014  uebayasi config(1), config(5): Introduce "select"

o Introduce a new selection directive "select" to select an attribute (as a
module) and its dependencies.
o Support "no select" too.
o Stop abusing "options" to select an attribute.
o Bump config(1) version.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file files was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.5 10-Jun-2024  kre More libarchive build fallout. With these changes, "build.sh build"
works for me (amd64). Testing "build.sh release" in parallel with this
commit.
 1.4 19-Jan-2020  christos branches: 1.4.4; 1.4.10;
Fix static linking (sun2)
 1.3 18-Jan-2020  christos not require .d files for the build.
 1.2 18-Jan-2020  ryoon Fix build. Three list.h files are required to generate .d files
 1.1 17-Jan-2020  christos new tests for libarchive
 1.4.10.1 01-Nov-2024  martin Pull up the following revisisions (as already intended yesterday),
requested by rin in ticket #991:

tests/usr.bin/cpio/Makefile rev 1.5 (with patch)
tests/usr.bin/tar/Makefile rev 1.5 (with patch)

More libarchive build fallout.
 1.4.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.4.1 19-Jan-2020  martin file Makefile was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.1 17-Jan-2020  christos branches: 1.1.4;
new tests for libarchive
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 17-Jan-2020  martin file t_cpio.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_basic.out was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_cut.in was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_dflag.out was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_dsflag.out was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_latin1.in was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_sflag.out was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_utf8.in was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.6 04-Mar-2025  gutteridge t_cut.sh: reflect that PR bin/59029 has been addressed
 1.5 22-Feb-2025  gutteridge t_cut.sh: correct a test case for -n (PR bin/59029)

The test case added before was based on how a version of GNU coreutils
cut(1) -- as patched by Red Hat to accept this flag -- behaved, but in
fact it, and OpenBSD's implementation, too, doesn't distinguish between
-c and -b -n, which doesn't align with the meaning/implementation used
in commercial Unix variants that originally offered -n (e.g., Solaris
and Tru64).

The new version of the test case clearly illustrates the differences
between interpretations of this flag (Solaris, FreeBSD, RHEL/Fedora,
OpenBSD).
 1.4 24-Jan-2025  gutteridge t_cut.sh: fix argument ordering of new test case, whoops

(PR bin/59029)
 1.3 24-Jan-2025  gutteridge t_cut.sh: add a test case for -n (PR bin/59029)
 1.2 24-Jan-2025  gutteridge t_cut.sh: capitalize ASCII acronym
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.46;
Deprecate tests/util.
 1.1.46.1 02-Aug-2025  perseant Sync with HEAD
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_cut.sh was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 03-May-2011  jruoho Add a test case for PR bin/26453.
 1.1 03-May-2011  jruoho Add a test case for PR bin/26453.
 1.1 03-May-2011  jruoho Add a test case for PR bin/26453.
 1.3 13-Mar-2012  jruoho PRs bin/41880 and bin/26453 were fixed, so remove xfails.
 1.2 11-May-2011  njoly branches: 1.2.4;
Remove shebang lines from test-script sources; avoids duplicate with
the build process which adds one too.
 1.1 03-May-2011  jruoho Add a test case for PR bin/26453.
 1.2.4.1 17-Apr-2012  yamt sync with head
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_dirname.sh was added on branch yamt-pagecache on 2012-04-17 00:09:18 +0000
 1.1 26-Aug-2023  rillig tests/usr.bin/error: add basic tests for several error message styles
 1.1 26-Aug-2023  rillig tests/usr.bin/error: add basic tests for several error message styles
 1.1 18-Mar-2012  jruoho branches: 1.1.2;
Add a case for PR bin/44973.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 18-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.6 19-Mar-2012  jruoho branches: 1.6.2;
Remove check.
 1.5 18-Mar-2012  jruoho Add a better check for the previous.
 1.4 18-Mar-2012  jruoho Also verify that PR bin/44179 is no longer an issue.
 1.3 18-Mar-2012  jruoho Now that this works, test also some random exit statuses.
 1.2 18-Mar-2012  dholland Remove xfail as PR 44973 is fixed. (Note that it was Nat Sloss who did
the work of figuring out what was wrong.)
 1.1 18-Mar-2012  jruoho Add a case for PR bin/44973.
 1.6.2.2 17-Apr-2012  yamt sync with head
 1.6.2.1 19-Mar-2012  yamt file t_find.sh was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 24-Jun-2020  jruoho Check that fstat(1) works (cf. PR kern/55407).
 1.1 24-Jun-2020  jruoho Check that fstat(1) works (cf. PR kern/55407).
 1.1 12-Oct-2024  riastradh branches: 1.1.2;
ftp(1): Add test for custom HTTP header fields.

Based on a patch from Sunil Nimmagadda <sunil@nimmagadda.net>.

PR bin/58581: ftp(1) should allow specifying header fields in http
requests
 1.1.2.2 13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #970):

tests/usr.bin/Makefile: revision 1.42
usr.bin/ftp/ruserpass.c: revision 1.34
usr.bin/ftp/main.c: revision 1.130
usr.bin/ftp/ssl.c: revision 1.17
usr.bin/ftp/main.c: revision 1.131
usr.bin/ftp/ssl.c: revision 1.18
usr.bin/ftp/main.c: revision 1.132
usr.bin/ftp/ssl.c: revision 1.19
usr.bin/ftp/main.c: revision 1.133
distrib/sets/lists/tests/mi: revision 1.1342
usr.bin/ftp/ftp.1: revision 1.151
usr.bin/ftp/ftp.1: revision 1.152
usr.bin/ftp/progressbar.c: revision 1.25
usr.bin/ftp/ftp.1: revision 1.153
usr.bin/ftp/progressbar.c: revision 1.26
usr.bin/ftp/ftp.1: revision 1.155
usr.bin/ftp/ftp.1: revision 1.156
usr.bin/ftp/fetch.c: revision 1.239
usr.bin/ftp/ftp.1: revision 1.157
usr.bin/ftp/ftp.1: revision 1.158
usr.bin/ftp/ftp.1: revision 1.159
usr.bin/ftp/ftp_var.h: revision 1.87
etc/mtree/NetBSD.dist.tests: revision 1.208
usr.bin/ftp/ftp_var.h: revision 1.88
usr.bin/ftp/ftp_var.h: revision 1.89
usr.bin/ftp/cmds.c: revision 1.142
usr.bin/ftp/util.c: revision 1.168
usr.bin/ftp/cmds.c: revision 1.143
tests/usr.bin/ftp/custom_headers.sh: revision 1.1
usr.bin/ftp/ssl.c: revision 1.20
usr.bin/ftp/complete.c: revision 1.48
tests/usr.bin/ftp/Makefile: revision 1.1
tests/usr.bin/ftp/t_custom_headers.sh: revision 1.1
usr.bin/ftp/fetch.c: revision 1.240
usr.bin/ftp/fetch.c: revision 1.241
usr.bin/ftp/ftp.c: revision 1.176
usr.bin/ftp/ftp.c: revision 1.177
(all via patch)

ftp(1): wording and formatting improvements

Fix grammar issue with "Support values" reported in private mail.
Document all file transfer types in "type" and cross-reference that.
Consistency fixes in describing file transfer parameters and types.

Fix some mandoc -Tlint issues (except "useless macro: Tn").

Add -b <buflen> to specify the buffer size.

ftp: bump FTPBUFLEN from 4kB to 16kB
sourceforge.net returns a 5kB content-security-policy.
Analyzed by mlelstv@ who reports usual limits are between 4kB and 48kB.
default is now 16K

ftp: improve -b documentation

Order -b bufsize in the synopsis.

Document the actual default value.

ftp: improve units used in comments and errors
Use "KiB" instead of "K" in errors.
Clarify related comments.

pass some lint.

PR/58581: Sunil Nimmagadda: Add flag to allow specifying extra http header
fields.

ftp(1): Nix trailing whitespace in man page.
No functional change intended.

PR bin/58581: ftp(1) should allow specifying header fields in http requests
fix markup (h -> H), explain about multiple headers, fix usage (from RVP)

Don't forget the dot, use the intended macro name (I think),
and improve the wording a little. (All related to the -H option.)
ftp(1): Add test for custom HTTP header fields.

Based on a patch from Sunil Nimmagadda.

PR bin/58581: ftp(1) should allow specifying header fields in http
requests
 1.1.2.1 12-Oct-2024  martin file Makefile was added on branch netbsd-10 on 2024-10-13 16:06:37 +0000
 1.1 12-Oct-2024  riastradh branches: 1.1.2;
ftp(1): Add test for custom HTTP header fields.

Based on a patch from Sunil Nimmagadda <sunil@nimmagadda.net>.

PR bin/58581: ftp(1) should allow specifying header fields in http
requests
 1.1.2.2 13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #970):

tests/usr.bin/Makefile: revision 1.42
usr.bin/ftp/ruserpass.c: revision 1.34
usr.bin/ftp/main.c: revision 1.130
usr.bin/ftp/ssl.c: revision 1.17
usr.bin/ftp/main.c: revision 1.131
usr.bin/ftp/ssl.c: revision 1.18
usr.bin/ftp/main.c: revision 1.132
usr.bin/ftp/ssl.c: revision 1.19
usr.bin/ftp/main.c: revision 1.133
distrib/sets/lists/tests/mi: revision 1.1342
usr.bin/ftp/ftp.1: revision 1.151
usr.bin/ftp/ftp.1: revision 1.152
usr.bin/ftp/progressbar.c: revision 1.25
usr.bin/ftp/ftp.1: revision 1.153
usr.bin/ftp/progressbar.c: revision 1.26
usr.bin/ftp/ftp.1: revision 1.155
usr.bin/ftp/ftp.1: revision 1.156
usr.bin/ftp/fetch.c: revision 1.239
usr.bin/ftp/ftp.1: revision 1.157
usr.bin/ftp/ftp.1: revision 1.158
usr.bin/ftp/ftp.1: revision 1.159
usr.bin/ftp/ftp_var.h: revision 1.87
etc/mtree/NetBSD.dist.tests: revision 1.208
usr.bin/ftp/ftp_var.h: revision 1.88
usr.bin/ftp/ftp_var.h: revision 1.89
usr.bin/ftp/cmds.c: revision 1.142
usr.bin/ftp/util.c: revision 1.168
usr.bin/ftp/cmds.c: revision 1.143
tests/usr.bin/ftp/custom_headers.sh: revision 1.1
usr.bin/ftp/ssl.c: revision 1.20
usr.bin/ftp/complete.c: revision 1.48
tests/usr.bin/ftp/Makefile: revision 1.1
tests/usr.bin/ftp/t_custom_headers.sh: revision 1.1
usr.bin/ftp/fetch.c: revision 1.240
usr.bin/ftp/fetch.c: revision 1.241
usr.bin/ftp/ftp.c: revision 1.176
usr.bin/ftp/ftp.c: revision 1.177
(all via patch)

ftp(1): wording and formatting improvements

Fix grammar issue with "Support values" reported in private mail.
Document all file transfer types in "type" and cross-reference that.
Consistency fixes in describing file transfer parameters and types.

Fix some mandoc -Tlint issues (except "useless macro: Tn").

Add -b <buflen> to specify the buffer size.

ftp: bump FTPBUFLEN from 4kB to 16kB
sourceforge.net returns a 5kB content-security-policy.
Analyzed by mlelstv@ who reports usual limits are between 4kB and 48kB.
default is now 16K

ftp: improve -b documentation

Order -b bufsize in the synopsis.

Document the actual default value.

ftp: improve units used in comments and errors
Use "KiB" instead of "K" in errors.
Clarify related comments.

pass some lint.

PR/58581: Sunil Nimmagadda: Add flag to allow specifying extra http header
fields.

ftp(1): Nix trailing whitespace in man page.
No functional change intended.

PR bin/58581: ftp(1) should allow specifying header fields in http requests
fix markup (h -> H), explain about multiple headers, fix usage (from RVP)

Don't forget the dot, use the intended macro name (I think),
and improve the wording a little. (All related to the -H option.)
ftp(1): Add test for custom HTTP header fields.

Based on a patch from Sunil Nimmagadda.

PR bin/58581: ftp(1) should allow specifying header fields in http
requests
 1.1.2.1 12-Oct-2024  martin file custom_headers.sh was added on branch netbsd-10 on 2024-10-13 16:06:36 +0000
 1.1 12-Oct-2024  riastradh branches: 1.1.2;
ftp(1): Add test for custom HTTP header fields.

Based on a patch from Sunil Nimmagadda <sunil@nimmagadda.net>.

PR bin/58581: ftp(1) should allow specifying header fields in http
requests
 1.1.2.2 13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #970):

tests/usr.bin/Makefile: revision 1.42
usr.bin/ftp/ruserpass.c: revision 1.34
usr.bin/ftp/main.c: revision 1.130
usr.bin/ftp/ssl.c: revision 1.17
usr.bin/ftp/main.c: revision 1.131
usr.bin/ftp/ssl.c: revision 1.18
usr.bin/ftp/main.c: revision 1.132
usr.bin/ftp/ssl.c: revision 1.19
usr.bin/ftp/main.c: revision 1.133
distrib/sets/lists/tests/mi: revision 1.1342
usr.bin/ftp/ftp.1: revision 1.151
usr.bin/ftp/ftp.1: revision 1.152
usr.bin/ftp/progressbar.c: revision 1.25
usr.bin/ftp/ftp.1: revision 1.153
usr.bin/ftp/progressbar.c: revision 1.26
usr.bin/ftp/ftp.1: revision 1.155
usr.bin/ftp/ftp.1: revision 1.156
usr.bin/ftp/fetch.c: revision 1.239
usr.bin/ftp/ftp.1: revision 1.157
usr.bin/ftp/ftp.1: revision 1.158
usr.bin/ftp/ftp.1: revision 1.159
usr.bin/ftp/ftp_var.h: revision 1.87
etc/mtree/NetBSD.dist.tests: revision 1.208
usr.bin/ftp/ftp_var.h: revision 1.88
usr.bin/ftp/ftp_var.h: revision 1.89
usr.bin/ftp/cmds.c: revision 1.142
usr.bin/ftp/util.c: revision 1.168
usr.bin/ftp/cmds.c: revision 1.143
tests/usr.bin/ftp/custom_headers.sh: revision 1.1
usr.bin/ftp/ssl.c: revision 1.20
usr.bin/ftp/complete.c: revision 1.48
tests/usr.bin/ftp/Makefile: revision 1.1
tests/usr.bin/ftp/t_custom_headers.sh: revision 1.1
usr.bin/ftp/fetch.c: revision 1.240
usr.bin/ftp/fetch.c: revision 1.241
usr.bin/ftp/ftp.c: revision 1.176
usr.bin/ftp/ftp.c: revision 1.177
(all via patch)

ftp(1): wording and formatting improvements

Fix grammar issue with "Support values" reported in private mail.
Document all file transfer types in "type" and cross-reference that.
Consistency fixes in describing file transfer parameters and types.

Fix some mandoc -Tlint issues (except "useless macro: Tn").

Add -b <buflen> to specify the buffer size.

ftp: bump FTPBUFLEN from 4kB to 16kB
sourceforge.net returns a 5kB content-security-policy.
Analyzed by mlelstv@ who reports usual limits are between 4kB and 48kB.
default is now 16K

ftp: improve -b documentation

Order -b bufsize in the synopsis.

Document the actual default value.

ftp: improve units used in comments and errors
Use "KiB" instead of "K" in errors.
Clarify related comments.

pass some lint.

PR/58581: Sunil Nimmagadda: Add flag to allow specifying extra http header
fields.

ftp(1): Nix trailing whitespace in man page.
No functional change intended.

PR bin/58581: ftp(1) should allow specifying header fields in http requests
fix markup (h -> H), explain about multiple headers, fix usage (from RVP)

Don't forget the dot, use the intended macro name (I think),
and improve the wording a little. (All related to the -H option.)
ftp(1): Add test for custom HTTP header fields.

Based on a patch from Sunil Nimmagadda.

PR bin/58581: ftp(1) should allow specifying header fields in http
requests
 1.1.2.1 12-Oct-2024  martin file t_custom_headers.sh was added on branch netbsd-10 on 2024-10-13 16:06:37 +0000
 1.1 18-Jan-2025  rillig tests/gcov: demonstrate wrong coverage report after vfork/exec

Discovered in usr.bin/make, function Cmd_Exec.

The coverage test I ran on 2024-07-13 was still good. I don't remember
the exact version of NetBSD-current I was running back then.

With NetBSD-current from 2025-01-17, gcov does not report full coverage
data after a vfork/exec call. Running the test program inside ktrace
shows that after a vfork call, the child process writes its coverage data
back, probably right before the exec call, but the parent process
doesn't.

Running a child process through system(3) is not affected; there,
posix_spawn is used instead of vfork/exec.
 1.1 18-Jan-2025  rillig tests/gcov: demonstrate wrong coverage report after vfork/exec

Discovered in usr.bin/make, function Cmd_Exec.

The coverage test I ran on 2024-07-13 was still good. I don't remember
the exact version of NetBSD-current I was running back then.

With NetBSD-current from 2025-01-17, gcov does not report full coverage
data after a vfork/exec call. Running the test program inside ktrace
shows that after a vfork call, the child process writes its coverage data
back, probably right before the exec call, but the parent process
doesn't.

Running a child process through system(3) is not affected; there,
posix_spawn is used instead of vfork/exec.
 1.1 08-Apr-2016  gson Add regression tests for some past gdb bugs.
 1.3 25-Jun-2020  jruoho Reference PRs consistently.
 1.2 07-Jun-2019  gson Add a regression test for PR bin/54154, or in other words, make sure
we get notified in a timely manner if gdb's XML support disappears
again.
 1.1 08-Apr-2016  gson branches: 1.1.16;
Add regression tests for some past gdb bugs.
 1.1.16.1 10-Jun-2019  christos Sync with HEAD
 1.2 09-Sep-2022  wiz grep: when -r is used, but no path argument provided, search the current dir

As discussed on tech-userlevel.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_basic.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_begin_end_a.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_begin_end_b.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.2 14-Jan-2017  christos PR/51875: Ngie Cooper: portability fixes
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.16;
Deprecate tests/util.
 1.1.16.1 20-Mar-2017  pgoyette Sync with HEAD
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_binary.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context2_a.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context2_b.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context2_c.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context_a.in was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context_a.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context_b.in was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context_b.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context_c.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_context_d.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_egrep.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_file_exp.in was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_file_exp.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_ignore_case.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_input was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_invert.in was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_invert.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_recurse.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 09-Sep-2022  wiz grep: when -r is used, but no path argument provided, search the current dir

As discussed on tech-userlevel.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_recurse_symlink.err was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_recurse_symlink.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_whole_line.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_word_regexps.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_zgrep.out was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.8 23-Nov-2024  rillig tests/grep: add expected output for grep -Fvx with overlapping patterns

By default, /usr/bin/grep is GNU grep, which does not exhibit this bug.
The tools build uses the grep implementation from usr.bin/grep, though.

See PR bin/58849.
 1.7 09-Sep-2022  wiz branches: 1.7.4;
grep: when -r is used, but no path argument provided, search the current dir

As discussed on tech-userlevel.
 1.6 30-Aug-2021  rillig tests/grep: fix typo in test description
 1.5 30-Aug-2021  rillig tests/grep: demonstrate word search bug in usr.bin/grep

By default, MKBSDGREP is "no", therefore GNU Grep is installed as
/usr/bin/grep instead of src/usr.bin/grep, and this bug does not occur
in practice.
 1.4 30-Aug-2021  rillig tests/grep: test word search with UTF-8 locale
 1.3 14-Jan-2017  christos PR/51875: Ngie Cooper: portability fixes
 1.2 17-May-2013  christos branches: 1.2.10;
PR/47825: Garrett Cooper: Fix hardcoding of NetBSD in t_grep.sh
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.4;
Deprecate tests/util.
 1.1.4.1 23-Jun-2013  tls resync from head
 1.1.2.3 22-May-2014  yamt 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")
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_grep.sh was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.2.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.7.4.1 02-Aug-2025  perseant Sync with HEAD
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.4 15-Oct-2024  martin Drop root requirement and dependency on the games set being installed.
 1.3 15-Oct-2024  martin The lzip test requires root (it tries to archive /usr/games/hide)
and the lzip binary (obviously).
 1.2 14-Oct-2024  christos Add a test for PR/58223
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.36; 1.1.44; 1.1.46;
Deprecate tests/util.
 1.1.46.1 02-Aug-2025  perseant Sync with HEAD
 1.1.44.2 16-Oct-2024  martin Additionally pull up following revision(s) (requested by rin in ticket #979):

tests/usr.bin/gzip/t_gzip.sh: revision 1.3
tests/usr.bin/gzip/t_gzip.sh: revision 1.4

The lzip test requires root (it tries to archive /usr/games/hide)
and the lzip binary (obviously).

Drop root requirement and dependency on the games set being installed.
 1.1.44.1 14-Oct-2024  martin Pull up following revision(s) (requested by christos in ticket #979):

usr.bin/gzip/unlz.c: revision 1.10
usr.bin/gzip/unlz.c: revision 1.9
usr.bin/gzip/unxz.c: revision 1.9
tests/usr.bin/gzip/t_gzip.sh: revision 1.2

PR/58223: RVP: Don't write to stdout when testing.

PR/58233: RVP: Fix lzip dictionary size calculation

Add a test for PR/58223
 1.1.36.2 16-Oct-2024  martin Additionally pull up following revision(s) (requested by rin in ticket #1913):

tests/usr.bin/gzip/t_gzip.sh: revision 1.3
tests/usr.bin/gzip/t_gzip.sh: revision 1.4

The lzip test requires root (it tries to archive /usr/games/hide)
and the lzip binary (obviously).

Drop root requirement and dependency on the games set being installed.
 1.1.36.1 14-Oct-2024  martin Pull up following revision(s) (requested by christos in ticket #1913):

usr.bin/gzip/unlz.c: revision 1.10
usr.bin/gzip/unlz.c: revision 1.9
usr.bin/gzip/unxz.c: revision 1.9
tests/usr.bin/gzip/t_gzip.sh: revision 1.2

PR/58223: RVP: Don't write to stdout when testing.

PR/58233: RVP: Fix lzip dictionary size calculation

Add a test for PR/58223
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_gzip.sh was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.2 15-Aug-2019  kamil Avoid symbol clashes in tests/usr.bin/id under MKSANITIZER

Remove symbol conflicts for:

- __getpwnam50
- __getpwuid50
- getgrgid
- getgrouplist
- getgroups
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.34; 1.1.36;
Deprecate tests/util.
 1.1.36.1 16-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #63):

tests/usr.bin/id/Makefile: revision 1.2

Avoid symbol clashes in tests/usr.bin/id under MKSANITIZER

Remove symbol conflicts for:
- __getpwnam50
- __getpwuid50
- getgrgid
- getgrouplist
- getgroups
 1.1.34.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file pwgr.c was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.2 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_groups.sh was added on branch yamt-pagecache on 2012-04-17 00:09:19 +0000
 1.2 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_id.sh was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_whoami.sh was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.49 16-Jun-2023  rillig indent: merge lexer symbols for type in/outside parentheses
 1.48 14-Jun-2023  rillig indent: merge parser symbols for stmt and stmt_list

They were handled in exactly the same way.
 1.47 20-May-2023  rillig tests/indent: migrate test driver from AWK to Lua

Lua reports more details when os.execute fails, which is useful when
running old versions of indent for comparison. The new test driver also
supports multiple test files in the same run.
 1.46 13-May-2023  rillig tests/indent: add test for lexing of numbers
 1.45 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.44 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.43 24-Apr-2022  rillig tests/indent: migrate tests for parentheses, brackets, braces
 1.42 23-Apr-2022  rillig tests/indent: migrate tests for the tokens '{' and '.'
 1.41 23-Apr-2022  rillig tests/indent: migrate a few token tests to psym tests
 1.40 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.39 28-Nov-2021  rillig tests/indent: migrate token_question to lsym_question and extend it
 1.38 28-Nov-2021  rillig tests/indent: migrate test token_case_label to lsym_case_label
 1.37 28-Nov-2021  rillig tests/indent: migrate token_comma to lsym_comma

The section on initializer values is new.
 1.36 28-Nov-2021  rillig tests/indent: move test for ':' to lsym_token.c
 1.35 28-Nov-2021  rillig indent: treat L"string" as a single token

There is never whitespace between the 'L' and the string literal or the
character constant. There might be a backslash-newline between them, but
that case was not handled before either.

No functional change.
 1.34 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.33 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.32 23-Oct-2021  rillig tests/indent: migrate test for '-bap -sob' to t_options
 1.31 23-Oct-2021  rillig tests/indent: migrate test for '--version' to t_options
 1.30 23-Oct-2021  rillig tests/indent: migrate test for offsetof to t_options
 1.29 23-Oct-2021  rillig tests/indent: remove redundant test list_head

The test cases are already in fmt_decl.c, in old_style_definition and
LIST_HEAD.
 1.28 23-Oct-2021  rillig tests/indent: migrate f_decls to using t_options, add more tests
 1.27 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.26 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.25 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.24 19-Oct-2021  rillig tests/indent: add test for INDENT OFF/ON comments

Just to prevent unintended side effects when fixing bugs in this area.
 1.23 19-Oct-2021  rillig tests/indent: make add-test generate flexible tests

They need fewer source files and are more versatile.
 1.22 18-Oct-2021  rillig tests/indent: remove redundant tests for '-ncs' and '-pcs'

These tests are already covered by opt_cs.c and opt_pcs.c.
 1.21 18-Oct-2021  rillig tests/indent: condense test for indentation level, add missing files
 1.20 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.19 18-Oct-2021  rillig tests/indent: extend tests for labels, extract test driver

Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
 1.18 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.17 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.16 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.15 14-Oct-2021  rillig tests/indent: provide full line coverage for argument handling
 1.14 13-Oct-2021  rillig indent: check command line options stricter

Previously, bool options were allowed to have trailing garbage. For
example, the option '-bacc' could be spelled '-bacchus' as well.

Check that the exact option name is given in the command line, to
prevent typos in the configuration files and to reduce surprises just in
case a future option is a prefix of an existing option, or vice versa.

Add a new test program for error handling. Most of these tests are so
simple that it would be overkill to create 3 files for each test.
 1.13 07-Oct-2021  rillig tests/indent: test parsing of command line options in profile file
 1.12 05-Oct-2021  rillig tests/indent: demonstrate off-by-one error in edge case
 1.11 25-Sep-2021  rillig tests/indent: test deeply nested struct declarations
 1.10 25-Sep-2021  rillig tests/indent: test edge cases for the tokenizer
 1.9 25-Sep-2021  rillig tests/indent: test lexing of character constants and string literals
 1.8 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.7 09-Mar-2021  rillig tests/indent: demonstrate strange alignment for global variables
 1.6 08-Mar-2021  rillig tests/indent: demonstrate wrong removed empty line before '//'
 1.5 08-Mar-2021  rillig tests/indent: demonstrate another bug in nested blocks
 1.4 08-Mar-2021  rillig tests/indent: add test for output line counting
 1.3 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 21-Feb-2021  rillig indent: add test demonstrating that indent cannot handle C99

indent cannot handle line-end comments.

The indent test suite requires each test file to have both a NetBSD and
a FreeBSD RCS ID. If the FreeBSD RCS ID is missing, the test will
silently pass since in that case, an empty file is compared with an
empty file. See the /start/,/end/ operator in t_indent.sh.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file Makefile was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file binary.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file binary.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 08-Mar-2021  rillig tests/indent: demonstrate another bug in nested blocks
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 08-Mar-2021  rillig tests/indent: demonstrate another bug in nested blocks
 1.9 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.8 30-Sep-2021  rillig tests/indent: add more tests with ')(', found bug in '//'
 1.7 24-Sep-2021  rillig indent: fix token duplication after C99 comment

The code that keeps blank lines after C99 comments still looks wrong,
but at least it's better than before.
 1.6 24-Sep-2021  rillig tests/indent: demonstrate token repetition after line-end comment
 1.5 12-Mar-2021  rillig tests/indent: demonstrate stray empty line at end-of-file
 1.4 07-Mar-2021  rillig indent: fix handling of '//' end-of-line comments
 1.3 07-Mar-2021  rillig tests/indent: allow for comments in either the input or output files
 1.2 06-Mar-2021  rillig tests/indent: extend test for '//' comments with more examples
 1.1 21-Feb-2021  rillig indent: add test demonstrating that indent cannot handle C99

indent cannot handle line-end comments.

The indent test suite requires each test file to have both a NetBSD and
a FreeBSD RCS ID. If the FreeBSD RCS ID is missing, the test will
silently pass since in that case, an empty file is compared with an
empty file. See the /start/,/end/ operator in t_indent.sh.
 1.10 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.9 08-Oct-2021  rillig indent: fix formatting of C99 comments

The first attempt at formatting C99 comments was conceptually wrong. It
accessed the next token in dump_line, even though that function should
only ever look at the buffers for the label, the code and the current
comment. (Understanding that part of the code was difficult at that time
due to the sheer number of global variables.) The complicated and
ever-growing condition for whether to output the token was a hack and in
retrospect doesn't make sense at all, that's why it only came close to
the intended effect.

Some unintended side effects were that the C99 comments had an
additional space in front of them, and that in some cases an empty line
followed the comment, and that the comments were not aligned.

Previously, the newline that terminates the C99 comment was included in
the comment. Separating the newline from the comment fixed all these
unintended side effects. The only downside is that the multi-line
statement is not indented, but that should be easy to fix.
 1.8 30-Sep-2021  rillig tests/indent: add more tests with ')(', found bug in '//'
 1.7 24-Sep-2021  rillig indent: fix token duplication after C99 comment

The code that keeps blank lines after C99 comments still looks wrong,
but at least it's better than before.
 1.6 24-Sep-2021  rillig tests/indent: demonstrate token repetition after line-end comment
 1.5 12-Mar-2021  rillig tests/indent: demonstrate stray empty line at end-of-file
 1.4 07-Mar-2021  rillig indent: fix handling of '//' end-of-line comments
 1.3 07-Mar-2021  rillig tests/indent: allow for comments in either the input or output files
 1.2 06-Mar-2021  rillig tests/indent: extend test for '//' comments with more examples
 1.1 21-Feb-2021  rillig indent: add test demonstrating that indent cannot handle C99

indent cannot handle line-end comments.

The indent test suite requires each test file to have both a NetBSD and
a FreeBSD RCS ID. If the FreeBSD RCS ID is missing, the test will
silently pass since in that case, an empty file is compared with an
empty file. See the /start/,/end/ operator in t_indent.sh.
 1.4 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.3 24-Sep-2021  rillig tests/indent: demonstrate inconsistent formatting of comments
 1.2 14-Mar-2021  rillig indent: fix off-by-one error in comment wrapping

The manual page says that the default maximum length of a comment line
is 78. The test 'comments.0' wrongly assumed that this 78 would refer
to the maximum _column_ allowed, which is off by one.

Fix the wording in the test 'comments.0' and remove the (now satisfied)
expectation comments in the test 'token-comment.0'.

Several other tests just happened to hit that limit, fix these as well.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file comments.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file comments.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.4 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.3 24-Sep-2021  rillig tests/indent: demonstrate inconsistent formatting of comments
 1.2 14-Mar-2021  rillig indent: fix off-by-one error in comment wrapping

The manual page says that the default maximum length of a comment line
is 78. The test 'comments.0' wrongly assumed that this 78 would refer
to the maximum _column_ allowed, which is off by one.

Fix the wording in the test 'comments.0' and remove the (now satisfied)
expectation comments in the test 'token-comment.0'.

Several other tests just happened to hit that limit, fix these as well.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file comments.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file cs.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file cs.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file cs.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.5 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.4 26-Sep-2021  rillig tests/indent: demonstrate missing space before ellipsis
 1.3 25-Sep-2021  rillig tests/indent: test deeply nested struct declarations
 1.2 06-Mar-2021  rillig tests/indent: fix unintended trailing whitespace and space-tab
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file declarations.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 25-Sep-2021  rillig tests/indent: test deeply nested struct declarations
 1.6 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.5 30-Sep-2021  rillig indent: remove space between ')' and '(' in declarations
 1.4 26-Sep-2021  rillig indent: fix missing space between comma and ellipsis

According to lint's C grammar, in standard C an ellipsis only occurs
after a comma. There are GCC extensions that allow an ellipsis as the
only function parameter, as well as in 'case a ... b', but these are
rare.
 1.3 26-Sep-2021  rillig tests/indent: demonstrate missing space before ellipsis
 1.2 25-Sep-2021  rillig tests/indent: test deeply nested struct declarations
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file declarations.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.4 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.3 04-Jun-2023  rillig indent: force at least one space after the colon of a label
 1.2 22-May-2023  rillig tests/indent: refine a few tests
 1.1 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file elsecomment.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file elsecomment.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.3 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.2 12-Oct-2021  rillig indent: fix wrapping for comments in otherwise empty lines

The comment above the code was wrong. The leading 3 characters were
indeed ignored, but the first of them was '/', not ' '. Of the trailing
3 characters, 2 were not ignored. The start and end of the comment would
not cancel out, they would rather sum up.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file elsecomment.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 23-Oct-2021  rillig tests/indent: migrate f_decls to using t_options, add more tests
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file f_decls.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 23-Oct-2021  rillig tests/indent: migrate f_decls to using t_options, add more tests
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file f_decls.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file float.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file float.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.8 14-Jun-2023  rillig indent: clean up the code, add a few tests
 1.7 22-May-2023  rillig indent: fix spacing between block braces
 1.6 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.5 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.60 25-Jun-2023  rillig indent: fix formatting of parenthesized name in function definition
 1.59 16-Jun-2023  rillig indent: merge lexer symbols for type in/outside parentheses
 1.58 16-Jun-2023  rillig indent: fix indentation and linebreaks in typedef declarations
 1.57 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.56 15-Jun-2023  rillig indent: fix alignment of multi-line declarations
 1.55 14-Jun-2023  rillig indent: clean up the code, add a few tests
 1.54 10-Jun-2023  rillig tests/indent: add move coverage tests
 1.53 10-Jun-2023  rillig indent: rename and sort variables in parser state

No functional change.
 1.52 09-Jun-2023  rillig indent: improve heuristics for function declaration vs. definition
 1.51 09-Jun-2023  rillig tests/indent: add real-life test cases from make(1) and lint(1)
 1.50 08-Jun-2023  rillig indent: remove fragile heuristic for detecting cast expressions

The assumption that in an expression of the form '(a * anything)', the
'*' marks a pointer type was too simple-minded.

For now, fix the obvious cases and leave the others for later. If
needed, they can be worked around using the '-T' option.
 1.49 05-Jun-2023  rillig tests/indent: add test for left-justifying declarations
 1.48 02-Jun-2023  rillig indent: remove newline between 'switch' and '{'
 1.47 02-Jun-2023  rillig indent: improve heuristics of classifying '*' as pointer or operator
 1.46 23-May-2023  rillig indent: fix indentation of struct declarations
 1.45 23-May-2023  rillig indent: fix spacing around '*' in declarations
 1.44 23-May-2023  rillig tests/indent: add code snippets found in make and lint1
 1.43 16-May-2023  rillig indent: remove blank between comment and parentheses or brackets

Finally, indent formats its own source code without messing up the
layout.
 1.42 15-May-2023  rillig indent: fix detection of casts

A word followed by a '(' does not start a cast expression.
 1.41 15-May-2023  rillig indent: fix type cast in function definition
 1.40 15-May-2023  rillig tests/indent: demonstrate wrong spacing after function prototype
 1.39 15-May-2023  rillig indent: fix spacing between function prototype and attributes
 1.38 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.37 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.36 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.35 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.34 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.33 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.32 27-Nov-2021  rillig indent: fix out of bounds memory access (since 2021-11-25)
 1.31 27-Nov-2021  rillig tests/indent: demonstrate strange formatting (since 2021-11-25)
 1.30 25-Nov-2021  rillig tests/indent: fix misleading typedef name
 1.29 25-Nov-2021  rillig indent: improve heuristic for spaces around '*' in declarations
 1.28 25-Nov-2021  rillig tests/indent: demonstrate more example for broken '*' in declarations

Since indent-2021.11.25.16.41.33.
 1.27 25-Nov-2021  rillig indent: fix heuristic for declaration/definition to post-1990 reality
 1.26 25-Nov-2021  rillig indent: fix spacing for unknown type names in declarations
 1.25 25-Nov-2021  rillig tests/indent: test '*' in function declarations
 1.24 25-Nov-2021  rillig indent: fix formatting of a few declarations involving unknown types
 1.23 24-Nov-2021  rillig tests/indent: demonstrate several real-life formatting bugs

Collected by indenting usr.bin/make with the default profile.

The heuristic for distinguishing between type names and other
identifiers is way too primitive, it seems to have stopped evolving
somewhere before function prototypes were standardized in C90, at least
it handles function prototypes poorly.

indent-2014.09.04.04.06.07 added seemingly random spaces to
declarations, which were fixed in indent-2019.04.04.15.27.35, which came
5 years later. The latter commit introduced many new bugs, but it also
fixed this one.

The wrongly indented struct member declaration for HashTable has been
there since at least indent-2000.10.11.14.46.04.

The wrongly indented initializer expression was added in
indent-2019.04.04.15.27.35 (see above).
 1.22 21-Nov-2021  rillig tests/indent: demonstrate wrong formatting of type names in declarations
 1.21 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.20 20-Nov-2021  rillig indent: clean up lint annotation and tests
 1.19 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.18 19-Nov-2021  rillig indent: fix formatting of function definitions (since 2019-04-04)

In the definition of a function with a pointer return type, the
formatting depended on the name of the function. Function names
matching [A-Za-z+] were formatted correctly, those containing [$0-9_]
weren't.
 1.17 19-Nov-2021  rillig tests/indent: update comment for the fix from the previous commit
 1.16 19-Nov-2021  rillig indent: fix lost function name (since 2019-04-04)

When indent searched for an identifier followed by a '(', to see whether
the identifier is a function name, it didn't care that the input buffer
could be resized due to a long line, which had made the pointer 'tp'
invalid. Fix this by stopping the search at the end of the line. A
better approach would be to have an unlimited lookahead buffer for
situations like these. The code that deals with character input has
already been extracted to io.c, so it's possible to implement that now.

While here, fix another access to undefined memory, after the loop.

There is still the issue of overwriting procname[0] with a blank, which
results in inconsistent formatting depending on the function name,
probably another case of accessing undefined memory, although the
results have been reproducible, but that may have been pure luck.

The formatted code looks clearly broken, but that's still better than
losing a token and destroying the whole file.
 1.15 18-Nov-2021  rillig tests/indent: demonstrate disappearing function name

Since 2019-04-04, as usual.
 1.14 18-Nov-2021  rillig tests/indent: demonstrate another bug imported from FreeBSD

Side note: the newly added test crashes at least the following versions
of indent with a segmentation fault on x86_64:

2000.10.11.14.46.04
2000.10.14.18.07.10
2000.10.17.02.16.44
2000.10.19.14.48.53
2000.10.19.16.31.26
2001.03.16.06.23.20
2001.03.23.20.12.41
2001.06.16.21.47.42
2001.07.20.13.43.50
2001.08.20.12.00.55
2001.12.01.19.27.33
2002.05.26.22.53.38
2003.02.25.10.35.44
 1.13 07-Nov-2021  rillig indent: rename type_at_paren_level_0 to type_outside_parentheses

For symmetry with type_in_parentheses.

No functional change.
 1.12 31-Oct-2021  rillig indent: rename lsym_type to better reflect reality

Type names that occur in parentheses are parsed as lsym_ident having the
subtype kw_type instead.

No functional change.
 1.11 31-Oct-2021  rillig indent: remove support for pre-1978 variable initialization
 1.10 31-Oct-2021  rillig tests/indent: test support for ancient initialization without '='
 1.9 31-Oct-2021  rillig indent: in debug log, print token subtype in same line

The keyword 'void' is parsed as lsym_type in some cases and lsym_ident
in others. Its corresponding keyword is always kw_type though. Put the
subtype into the same line as the other token information.
 1.8 31-Oct-2021  rillig tests/indent: document that 'void' is not always parsed as a type
 1.7 30-Oct-2021  rillig tests/indent: document why declaration lines are broken unnecessarily
 1.6 27-Oct-2021  rillig indent: fix indentation of local variable declarations

This had been broken since the import of FreeBSD indent in 2019.
 1.5 26-Oct-2021  rillig tests/indent: demonstrate another example of wrong formatting
 1.4 26-Oct-2021  rillig tests/indent: demonstrate wrong indentation of local declarations

Reported by RVP via private mail. Importing FreeBSD indent in 2019 fixed
the trailing space in line 1, at the cost of lots of other bugs.

indent-2000.10.11.14.46.04
| int <-- trailing space
| main(void)
| {
| char (*f1) () = NULL;
| char *(*f1) () = NULL;
| char *(*f2) ();
| }
indent-2019.02.03.03.19.29

indent-2019.04.04.15.27.35
| int
| main(void)
| {
| char (*f1) () = NULL;
| char *(* f1) () = NULL;
| char *(* f2) ();
| }
indent-2021.09.30.21.38.43

indent-2021.09.30.21.48.12
| int
| main(void)
| {
| char (*f1)() = NULL;
| char *(* f1)() = NULL;
| char *(* f2)();
| }
 1.3 23-Oct-2021  rillig tests/indent: remove redundant test list_head

The test cases are already in fmt_decl.c, in old_style_definition and
LIST_HEAD.
 1.2 23-Oct-2021  rillig tests/indent: migrate f_decls to using t_options, add more tests
 1.1 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.6 23-Jun-2023  rillig tests/indent: fix comments
 1.5 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.11 03-Dec-2023  rillig tests/indent: test compound expressions
 1.10 16-Jun-2023  rillig tests/indent: format stderr output as end-of-line comments

This generates fewer error markers in syntax-aware editors.
 1.9 16-Jun-2023  rillig indent: improve heuristics for casts
 1.8 14-Jun-2023  rillig tests/indent: separate stdout from stderr

Due to buffering, there was no guarantee that the output would be
exactly in the same order as written in the tests.
 1.7 10-Jun-2023  rillig indent: fix indentation of continuation lines in initializers
 1.6 09-Jun-2023  rillig indent: support C99 compound literals
 1.5 09-Jun-2023  rillig tests/indent: add real-life test cases from make(1) and lint(1)
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 23-Oct-2021  rillig tests/indent: migrate test for offsetof to t_options
 1.1 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.15 04-Jun-2023  rillig tests/indent: cover code in lexi.c
 1.14 03-Jun-2023  rillig indent: fix indentation of adjacent '{'
 1.13 21-May-2023  rillig tests/indent: fix outdated or wrong comments
 1.12 20-May-2023  rillig indent: ensure that no blank lines are inserted in INDENT OFF mode

No blank lines were inserted previously, but the code looked
suspicious as if that were possible.
 1.11 16-May-2023  rillig indent: fix handling of INDENT OFF/ON comments

Previously, the 'INDENT OFF' comments were interpreted when the newline
token from the line above the comment was processed, which was earlier
than could be reasonably expected.

The 'INDENT ON' comments were interpreted equally early, which led to
the situation that the 'INDENT OFF' comments were preserved literally
but the 'INDENT ON' comments weren't.
 1.10 14-May-2023  rillig indent: fix handling of multiple block comments in a line
 1.9 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 25-Nov-2021  rillig indent: fix heuristic for declaration/definition to post-1990 reality
 1.5 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.4 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.3 19-Oct-2021  rillig indent: use simpler code for copying the input buffer

In debug mode, this reduces the amount of debug output lines.

No functional change in default mode.
 1.2 19-Oct-2021  rillig tests/indent: move tests for indent comments

The special INDENT ON and INDENT OFF comments look like ordinary
comments but are handled in inbuf_read_line. Implementing this feature
in the input function has several unintended side effects regarding
indentation of these comments, as demonstrated by the tests.
 1.1 19-Oct-2021  rillig tests/indent: add test for INDENT OFF/ON comments

Just to prevent unintended side effects when fixing bugs in this area.
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 09-Mar-2021  rillig tests/indent: demonstrate strange alignment for global variables
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 09-Mar-2021  rillig tests/indent: demonstrate strange alignment for global variables
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 09-Mar-2021  rillig tests/indent: demonstrate strange alignment for global variables
 1.3 18-Oct-2021  rillig tests/indent: extend tests for labels, extract test driver

Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
 1.2 27-Sep-2021  rillig tests/indent: document that label indentation is not configurable

For at least the past 27 years, labels have been indented 2 levels to
the left of the corresponding statement. See label_offset and
compute_label_indent (or compute_label_target in FreeBSD).
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file label.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: extend tests for labels, extract test driver

Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file label.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.3 18-Oct-2021  rillig tests/indent: extend tests for labels, extract test driver

Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
 1.2 27-Sep-2021  rillig tests/indent: document that label indentation is not configurable

For at least the past 27 years, labels have been indented 2 levels to
the left of the corresponding statement. See label_offset and
compute_label_indent (or compute_label_target in FreeBSD).
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file label.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.9 04-Jun-2023  rillig indent: force at least one space after the colon of a label
 1.8 04-Jun-2023  rillig indent: fix formatting of compound expressions, at least partially
 1.7 02-Jun-2023  rillig indent: remove newline between 'switch' and '{'
 1.6 13-May-2023  rillig indent: clean up a condition, add comments

No functional change.
 1.5 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.1 18-Oct-2021  rillig tests/indent: extend tests for labels, extract test driver

Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 25-Sep-2021  rillig tests/indent: test edge cases for the tokenizer
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 25-Sep-2021  rillig tests/indent: test edge cases for the tokenizer
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 25-Sep-2021  rillig tests/indent: test edge cases for the tokenizer
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 25-Sep-2021  rillig tests/indent: extend tests for strings and characters
 1.1 25-Sep-2021  rillig tests/indent: test lexing of character constants and string literals
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 25-Sep-2021  rillig tests/indent: test lexing of character constants and string literals
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 25-Sep-2021  rillig tests/indent: extend tests for strings and characters
 1.1 25-Sep-2021  rillig tests/indent: test lexing of character constants and string literals
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.7 04-Jun-2023  rillig tests/indent: clean up comments
 1.6 15-May-2023  rillig indent: remove backslash line continuation outside preprocessing

The indenter did not handle these backslashes well, interpreting them as
unary operators, and they are an edge case anyway. Line continuations
in string literals and character constants are kept.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.2 31-Oct-2021  rillig indent: remove support for pre-1978 variable initialization
 1.1 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.2 13-May-2023  rillig indent: fix lexing of numbers that are spread over multiple lines
 1.1 13-May-2023  rillig tests/indent: add test for lexing of numbers
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 25-Sep-2021  rillig tests/indent: extend tests for strings and characters
 1.1 25-Sep-2021  rillig tests/indent: test lexing of character constants and string literals
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 25-Sep-2021  rillig tests/indent: test lexing of character constants and string literals
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 25-Sep-2021  rillig tests/indent: extend tests for strings and characters
 1.1 25-Sep-2021  rillig tests/indent: test lexing of character constants and string literals
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 08-Mar-2021  rillig tests/indent: add test for output line counting
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 08-Mar-2021  rillig tests/indent: add test for output line counting
 1.2 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.1 08-Mar-2021  rillig tests/indent: add test for output line counting
 1.2 23-Oct-2021  rillig tests/indent: remove redundant test list_head

The test cases are already in fmt_decl.c, in old_style_definition and
LIST_HEAD.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file list_head.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 23-Oct-2021  rillig tests/indent: remove redundant test list_head

The test cases are already in fmt_decl.c, in old_style_definition and
LIST_HEAD.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file list_head.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.12 14-Jun-2023  rillig indent: remove a redundant flag from the parser state

No functional change.
 1.11 04-Jun-2023  rillig indent: do not parse '&&&&&&&' as a single binary operator
 1.10 04-Jun-2023  rillig indent: fix '*=' to be a binary operator, not a unary one
 1.9 04-Jun-2023  rillig tests/indent: cover code in lexi.c
 1.8 04-Jun-2023  rillig tests/indent: clean up comments
 1.7 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.6 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 23-Apr-2022  rillig tests/indent: migrate tests for unary and binary operators
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 25-Nov-2021  rillig indent: extract lex_asterisk_unary into separate function

No functional change.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.11 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.10 10-Jun-2023  rillig indent: explain right-aligned code
 1.9 10-Jun-2023  rillig indent: fix token classification in declarations

As a side effect, indent handles _Generic from C11 properly now, at
least in -nlp mode.
 1.8 04-Jun-2023  rillig indent: force at least one space after the colon of a label
 1.7 04-Jun-2023  rillig lint: use separate lexer symbols for 'case' and 'default'

It's not strictly necessary since these tokens behave in the same way,
still, the code is more straight-forward when there are separate tokens.
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 28-Nov-2021  rillig tests/indent: migrate test token_case_label to lsym_case_label
 1.3 24-Nov-2021  rillig tests/indent: demonstrate several real-life formatting bugs

Collected by indenting usr.bin/make with the default profile.

The heuristic for distinguishing between type names and other
identifiers is way too primitive, it seems to have stopped evolving
somewhere before function prototypes were standardized in C90, at least
it handles function prototypes poorly.

indent-2014.09.04.04.06.07 added seemingly random spaces to
declarations, which were fixed in indent-2019.04.04.15.27.35, which came
5 years later. The latter commit introduced many new bugs, but it also
fixed this one.

The wrongly indented struct member declaration for HashTable has been
there since at least indent-2000.10.11.14.46.04.

The wrongly indented initializer expression was added in
indent-2019.04.04.15.27.35 (see above).
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 28-Nov-2021  rillig tests/indent: migrate test token_case_label to lsym_case_label
 1.2 28-Nov-2021  rillig tests/indent: move test for ':' to lsym_token.c
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 28-Nov-2021  rillig tests/indent: migrate token_comma to lsym_comma

The section on initializer values is new.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.25 03-Jan-2025  rillig indent: fix line breaks in else-if sequences

The flag ps.want_newline did not adequately model the conditions under
which a line break should be inserted, thus the redesign.

A welcome side effect is that in statements like 'if (cond);', the
semicolon is now placed on a separate line, thus becoming more visible.
 1.24 23-Jun-2023  rillig branches: 1.24.2;
indent: fix scanning of no-wrap comments (since 2021.11.07.10.34.03)

The "refactoring" back then tried to be too clever.
 1.23 18-Jun-2023  rillig indent: remove support for backspace in code and comments

The C code in the whole tree does not contain a single literal
backspace.
 1.22 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.21 14-Jun-2023  rillig indent: clean up handling of comments

One less moving part in the parser state.

No functional change.
 1.20 10-Jun-2023  rillig indent: miscellaneous cleanups
 1.19 10-Jun-2023  rillig indent: rename and sort variables in parser state

No functional change.
 1.18 06-Jun-2023  rillig indent: right-trim single-line comments
 1.17 06-Jun-2023  rillig tests/indent: comments with trailing whitespace may fit in a single line
 1.16 05-Jun-2023  rillig indent: fix trailing whitespace after comment
 1.15 21-May-2023  rillig tests/indent: fix outdated or wrong comments
 1.14 20-May-2023  rillig indent: implement blank line above block comment
 1.13 16-May-2023  rillig indent: remove support for form feed characters inside a line

Form feeds are occasionally used to split code into pages, and this use
is still supported. Having a form feed in the middle of a line is
exotic.
 1.12 15-May-2023  rillig indent: fix duplicate space between comment and binary operator
 1.11 15-May-2023  rillig indent: fix line wrapping of comments to the right of code
 1.10 15-May-2023  rillig indent: clean up memory and buffer management

Remove the need to explicitly initialize the buffers. To avoid
subtracting null pointers or comparing them using '<', migrate the
buffers from the (start, end) form to the (start, len) form. This form
also avoids inconsistencies in whether 'buf.e == buf.s' or 'buf.s ==
buf.e' is used.

Make buffer.st const, to avoid accidental modification of the buffer's
content.

Replace '*buf.e++ = ch' with buf_add_char, to avoid having to keep track
how much unwritten space is left in the buffer. Remove all safety
margins, that is, no more unchecked access to buf.st[-1] or appending
using '*buf.e++'.

Fix line number counting in lex_word for words that contain line breaks.

No functional change.
 1.9 14-May-2023  rillig indent: only null-terminate the buffers if necessary

The only case where a buffer is used as a C-style string is when looking
up a keyword.

No functional change.
 1.8 14-May-2023  rillig indent: fix handling of multiple block comments in a line
 1.7 13-May-2023  rillig indent: do not add a space before a comment that starts a line
 1.6 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.5 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.24.2.1 02-Aug-2025  perseant Sync with HEAD
 1.10 05-Jun-2023  rillig indent: fix formatting of 'do' statements
 1.9 05-Jun-2023  rillig indent: fix trailing whitespace after comment
 1.8 05-Jun-2023  rillig tests/indent: add tests for 'do-while' loops
 1.7 22-May-2023  rillig tests/indent: refine a few tests
 1.6 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.5 11-May-2023  rillig indent: remove unnecessary assignments to last_else

No functional change intended.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.9 26-Jun-2023  rillig indent: improve heuristics for '*' as pointer in for loops
 1.8 26-Jun-2023  rillig indent: improve heuristics for '*' as a pointer type
 1.7 08-Jun-2023  rillig indent: remove fragile heuristic for detecting cast expressions

The assumption that in an expression of the form '(a * anything)', the
'*' marks a pointer type was too simple-minded.

For now, fix the obvious cases and leave the others for later. If
needed, they can be worked around using the '-T' option.
 1.6 23-May-2023  rillig indent: fix spacing in declarations in for loops
 1.5 23-May-2023  rillig tests/indent: add code snippets found in make and lint1
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.8 21-May-2023  rillig tests/indent: fix outdated or wrong comments
 1.7 16-May-2023  rillig indent: remove support for form feed characters inside a line

Form feeds are occasionally used to split code into pages, and this use
is still supported. Having a form feed in the middle of a line is
exotic.
 1.6 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.5 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.7 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.6 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.5 22-May-2023  rillig tests/indent: refine a few tests
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6 10-Jun-2023  rillig indent: fix line break between semicolon and brace
 1.5 10-Jun-2023  rillig indent: miscellaneous cleanups
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.10 16-Jun-2023  rillig tests/indent: format stderr output as end-of-line comments

This generates fewer error markers in syntax-aware editors.
 1.9 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.8 04-Jun-2023  rillig indent: fix indentation of initializers in compound expressions
 1.7 03-Jun-2023  rillig indent: fix indentation of adjacent '{'
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 23-Apr-2022  rillig tests/indent: migrate tests for the tokens '{' and '.'
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 13-Feb-2022  rillig tests/indent: demonstrate the poor handling of compound literals
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.20 03-Jan-2025  rillig indent: fix line breaks in else-if sequences

The flag ps.want_newline did not adequately model the conditions under
which a line break should be inserted, thus the redesign.

A welcome side effect is that in statements like 'if (cond);', the
semicolon is now placed on a separate line, thus becoming more visible.
 1.19 17-Jun-2023  rillig branches: 1.19.2;
tests/indent: add miscellaneous test cases found during clean up
 1.18 16-Jun-2023  rillig indent: fix spacing between postfix operator and left parenthesis
 1.17 14-Jun-2023  rillig indent: allow more than 20 nested parentheses or brackets
 1.16 10-Jun-2023  rillig indent: fix indentation of continuation lines in initializers
 1.15 08-Jun-2023  rillig indent: fix indentation of initializer lists with designators
 1.14 08-Jun-2023  rillig tests/indent: add more tests, from indent's own code
 1.13 04-Jun-2023  rillig indent: force at least one space after the colon of a label
 1.12 04-Jun-2023  rillig indent: rename struct field, for better symmetry

No binary change outside debug mode.
 1.11 04-Jun-2023  rillig indent: fix indentation of initializers in compound expressions
 1.10 04-Jun-2023  rillig indent: fix formatting of compound expressions, at least partially
 1.9 16-May-2023  rillig indent: remove support for form feed characters inside a line

Form feeds are occasionally used to split code into pages, and this use
is still supported. Having a form feed in the middle of a line is
exotic.
 1.8 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.7 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.6 24-Apr-2022  rillig tests/indent: migrate tests for parentheses, brackets, braces
 1.5 23-Apr-2022  rillig tests/indent: add tests for unary and binary operators
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 13-Feb-2022  rillig tests/indent: test token '('

There are already some tests in token_lparen.c that need to be merged.
 1.2 13-Feb-2022  rillig tests/indent: demonstrate the poor handling of compound literals
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.19.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 09-Jun-2023  rillig indent: trim trailing blank lines
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 23-Apr-2022  rillig tests/indent: migrate tests for the tokens '{' and '.'
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.15 16-Jun-2023  rillig tests/indent: format stderr output as end-of-line comments

This generates fewer error markers in syntax-aware editors.
 1.14 14-Jun-2023  rillig indent: clean up the code, add a few tests
 1.13 14-Jun-2023  rillig tests/indent: separate stdout from stderr

Due to buffering, there was no guarantee that the output would be
exactly in the same order as written in the tests.
 1.12 14-Jun-2023  rillig indent: use correct preprocessing directive in error message
 1.11 14-Jun-2023  rillig indent: allow more than 5 levels of #if/#endif
 1.10 13-May-2023  rillig indent: preserve indentation of preprocessor directives
 1.9 11-May-2023  rillig tests/indent: test interaction between preprocessing and comments
 1.8 11-May-2023  rillig indent: don't touch comments in preprocessing lines

The indentation of multi-line comments was wrong, and the code for
handling them was too complicated.
 1.7 11-May-2023  rillig tests/indent: add more tests for preprocessing directives
 1.6 11-May-2023  rillig tests/indent: test multi-line comments in preprocessing lines
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 15-May-2023  rillig indent: fix indentation of multi-line '?:' expressions in functions
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 28-Nov-2021  rillig tests/indent: migrate token_question to lsym_question and extend it
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.8 04-Jan-2025  rillig indent: fix indentation of adjacent multi-line initializers

The main topic of this change is parse.c:66, which makes the indentation
of statements uniform with the indentation of other parser symbols.

That change had the side effect of messing up the indentation of files
whose first line does not start in column 1, such as in ps_ind_level.c.
To fix this side effect, the initial indentation must be determined
before pushing the placeholder token psym_stmt during initialization.
 1.7 08-Jun-2023  rillig branches: 1.7.2;
indent: clean up and condense code

No functional change.
 1.6 04-Jun-2023  rillig indent: fix indentation of initializers in compound expressions
 1.5 03-Jun-2023  rillig indent: fix indentation of adjacent '{'
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 24-Apr-2022  rillig tests/indent: migrate tests for parentheses, brackets, braces
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 28-Nov-2021  rillig tests/indent: test variants of the 'return' statement
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.8 16-Jun-2023  rillig indent: improve heuristics for cast expressions
 1.7 16-Jun-2023  rillig indent: improve heuristics for cast expressions
 1.6 16-Jun-2023  rillig tests/indent: add a few code snippets from usr.bin/xlint
 1.5 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6 16-Jun-2023  rillig tests/indent: format stderr output as end-of-line comments

This generates fewer error markers in syntax-aware editors.
 1.5 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 25-Nov-2021  rillig indent: improve heuristic for spaces around '*' in declarations
 1.2 25-Nov-2021  rillig tests/indent: demonstrate 'sizeof(int) *expr' (since 2021-11-25)

Broken in indent-2021.11.25.16.41.33, while fixing the spacing around
'*' in declarations.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6 25-Jun-2023  rillig indent: treat 'complex' and 'imaginary' as type modifiers, not as types
 1.5 04-Jun-2023  rillig indent: classify 'inline' as a modifier rather than a word
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.2 28-Nov-2021  rillig indent: treat L"string" as a single token

There is never whitespace between the 'L' and the string literal or the
character constant. There might be a backslash-newline between them, but
that case was not handled before either.

No functional change.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 14-Jun-2023  rillig indent: fix formatting of comment after 'switch (expr)'
 1.4 10-Jun-2023  rillig indent: miscellaneous cleanups
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.10 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.9 15-Jun-2023  rillig indent: fix indentation of multi-line enum constant initializers
 1.8 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.7 15-May-2023  rillig indent: fix indentation of struct member names
 1.6 15-May-2023  rillig tests/indent: demonstrate wrong indentation of struct members
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 12-Feb-2022  rillig tests/indent: add another test for indentation of enum constants

To prevent an overzealous quick hack for indenting enum constants in a
typedef, as part of fixing PR#55453.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.1 16-Jun-2023  rillig indent: merge lexer symbols for type in/outside parentheses
 1.5 16-Jun-2023  rillig indent: merge lexer symbols for type in/outside parentheses
 1.4 21-May-2023  rillig tests/indent: fix outdated or wrong comments
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.8 16-Jun-2023  rillig indent: merge lexer symbols for type in/outside parentheses
 1.7 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.6 04-Jun-2023  rillig tests/indent: cover code in lexi.c
 1.5 15-May-2023  rillig indent: improve type guessing, fix formatting of declarations
 1.4 15-May-2023  rillig tests/indent: test type detection
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.9 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.8 16-Jun-2023  rillig indent: fix indentation and linebreaks in typedef declarations
 1.7 16-Jun-2023  rillig tests/indent: demonstrate wrong tokenization after typedef

Since 2023-06-10 06:52, which fixed the indentation of C11 _Generic
expressions.
 1.6 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 12-Feb-2022  rillig indent: fix indentation of enum constants in typedef (since 2019-04-04)

The solution is not elegant since it adds a small state machine inside
the parser state, but at least these states only depend on the sequence
of token types and not on any other part of the parser state.

Reported in PR#55453.
 1.2 12-Feb-2022  rillig tests/indent: demonstrate wrong formatting of enum (since 2019-04-04)

Reported by me in PR#55453.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.13 22-Oct-2023  rillig tests/indent: clean up comments
 1.12 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.11 16-Jun-2023  rillig indent: improve heuristics for casts
 1.10 08-Jun-2023  rillig indent: remove fragile heuristic for detecting cast expressions

The assumption that in an expression of the form '(a * anything)', the
'*' marks a pointer type was too simple-minded.

For now, fix the obvious cases and leave the others for later. If
needed, they can be worked around using the '-T' option.
 1.9 08-Jun-2023  rillig tests/indent: add more tests, from indent's own code
 1.8 02-Jun-2023  rillig indent: improve heuristics of classifying '*' as pointer or operator
 1.7 23-May-2023  rillig tests/indent: add code snippets found in make and lint1
 1.6 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 23-Apr-2022  rillig tests/indent: migrate tests for unary and binary operators
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.7 03-Jan-2025  rillig indent: fix line breaks in else-if sequences

The flag ps.want_newline did not adequately model the conditions under
which a line break should be inserted, thus the redesign.

A welcome side effect is that in statements like 'if (cond);', the
semicolon is now placed on a separate line, thus becoming more visible.
 1.6 02-Jun-2023  rillig branches: 1.6.2;
indent: force each statement on a new line

Previously, '{} while (cond)' was kept on a single line, even though the
'while' was independent of the '{}'.
 1.5 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.6 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 20-Nov-2021  rillig indent: fix tokenizing of word-like tokens (since 2019-04-04)

After a backslash-newline, the first character of the next line is only
part of the identifier if it is an identifier character.

indent-2000.10.11.14.46.04
| int var \
| +name = 4;
indent-2012.11.20.03.02.57

indent-2014.09.04.04.06.07
| int var \
| +name = 4;
indent-2019.02.03.03.19.29

indent-2019.04.04.15.27.35
| int var+name = 4;
indent-2021.11.19.20.23.17

indent
| int var + name = 4;
 1.2 20-Nov-2021  rillig tests/indent: demonstrate wrong identifier token (since 2019-04-04)

No matter how simple a piece of code is, without proper automated tests
there is always the chance of breaking it.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.2 18-Oct-2021  rillig tests/indent: remove redundant tests for '-ncs' and '-pcs'

These tests are already covered by opt_cs.c and opt_pcs.c.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file ncs.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: remove redundant tests for '-ncs' and '-pcs'

These tests are already covered by opt_cs.c and opt_pcs.c.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file ncs.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: remove redundant tests for '-ncs' and '-pcs'

These tests are already covered by opt_cs.c and opt_pcs.c.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file ncs.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 23-Oct-2021  rillig tests/indent: migrate test for offsetof to t_options
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file offsetof.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 23-Oct-2021  rillig tests/indent: migrate test for offsetof to t_options
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file offsetof.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.3 23-Oct-2021  rillig tests/indent: migrate test for '--version' to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 23-Oct-2021  rillig tests/indent: migrate test for '--version' to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 23-Oct-2021  rillig tests/indent: migrate test for '--version' to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.3 14-Mar-2021  rillig indent: fix off-by-one error in comment wrapping

The manual page says that the default maximum length of a comment line
is 78. The test 'comments.0' wrongly assumed that this 78 would refer
to the maximum _column_ allowed, which is off by one.

Fix the wording in the test 'comments.0' and remove the (now satisfied)
expectation comments in the test 'token-comment.0'.

Several other tests just happened to hit that limit, fix these as well.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 05-Oct-2021  rillig tests/indent: demonstrate bugs in -bacc and -nbacc

This part of indent has been broken since at least 2000. The update from
FreeBSD indent on 2019-04-04 made it worse than before.

To see the various results over time, older versions of indent compile
fine if they get passed the -fcommon compiler option.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 05-Oct-2021  rillig tests/indent: demonstrate bugs in -bacc and -nbacc

This part of indent has been broken since at least 2000. The update from
FreeBSD indent on 2019-04-04 made it worse than before.

To see the various results over time, older versions of indent compile
fine if they get passed the -fcommon compiler option.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 23-Oct-2021  rillig tests/indent: migrate test for '-bap -sob' to t_options
 1.1 08-Mar-2021  rillig tests/indent: demonstrate wrong removed empty line before '//'
 1.2 23-Oct-2021  rillig tests/indent: migrate test for '-bap -sob' to t_options
 1.1 08-Mar-2021  rillig tests/indent: demonstrate wrong removed empty line before '//'
 1.3 23-Oct-2021  rillig tests/indent: migrate test for '-bap -sob' to t_options
 1.2 14-Mar-2021  rillig indent: fix off-by-one error in comment wrapping

The manual page says that the default maximum length of a comment line
is 78. The test 'comments.0' wrongly assumed that this 78 would refer
to the maximum _column_ allowed, which is off by one.

Fix the wording in the test 'comments.0' and remove the (now satisfied)
expectation comments in the test 'token-comment.0'.

Several other tests just happened to hit that limit, fix these as well.
 1.1 08-Mar-2021  rillig tests/indent: demonstrate wrong removed empty line before '//'
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.3 06-Mar-2021  rillig tests/indent: fix unintended trailing whitespace and space-tab
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 11 test cases, demonstrate 8 bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.6 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.5 13-Oct-2021  rillig tests/indent: test long comments in single line

I had expected them to differ depending on the option '-[n]fc1', but
they look exactly the same. There are several possibilities for the
leading space in the output.
 1.4 25-Sep-2021  rillig tests/indent: demonstrate mergin of comments

This may or may not have been intended. Especially with the option
'-nfc1' the result looks confusing. It's not a case that occurs every
day, though.
 1.3 24-Sep-2021  rillig tests/indent: demonstrate inconsistent formatting of comments
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.6 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.5 13-Oct-2021  rillig tests/indent: test long comments in single line

I had expected them to differ depending on the option '-[n]fc1', but
they look exactly the same. There are several possibilities for the
leading space in the output.
 1.4 25-Sep-2021  rillig tests/indent: demonstrate mergin of comments

This may or may not have been intended. Especially with the option
'-nfc1' the result looks confusing. It's not a case that occurs every
day, though.
 1.3 24-Sep-2021  rillig tests/indent: demonstrate inconsistent formatting of comments
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.3 08-Oct-2021  rillig indent: remove 'global' from the list of keywords

Since 1978, 'global' has not been a keyword in C. Moreover, it was
declared as a type while its name would rather suggest a storage class.

Removing the keyword fixes the formatting of variables named 'global'.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.3 08-Oct-2021  rillig indent: remove 'global' from the list of keywords

Since 1978, 'global' has not been a keyword in C. Moreover, it was
declared as a type while its name would rather suggest a storage class.

Removing the keyword fixes the formatting of variables named 'global'.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 05-Oct-2021  rillig tests/indent: demonstrate bugs in -bacc and -nbacc

This part of indent has been broken since at least 2000. The update from
FreeBSD indent on 2019-04-04 made it worse than before.

To see the various results over time, older versions of indent compile
fine if they get passed the -fcommon compiler option.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 05-Oct-2021  rillig tests/indent: demonstrate bugs in -bacc and -nbacc

This part of indent has been broken since at least 2000. The update from
FreeBSD indent on 2019-04-04 made it worse than before.

To see the various results over time, older versions of indent compile
fine if they get passed the -fcommon compiler option.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add tests for negative options

Since most of these options are of the form "don't do anything", the
input and output of these tests is very similar.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.6 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.5 13-Oct-2021  rillig tests/indent: test long comments in single line

I had expected them to differ depending on the option '-[n]fc1', but
they look exactly the same. There are several possibilities for the
leading space in the output.
 1.4 25-Sep-2021  rillig tests/indent: demonstrate mergin of comments

This may or may not have been intended. Especially with the option
'-nfc1' the result looks confusing. It's not a case that occurs every
day, though.
 1.3 24-Sep-2021  rillig tests/indent: demonstrate inconsistent formatting of comments
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.6 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.5 13-Oct-2021  rillig tests/indent: test long comments in single line

I had expected them to differ depending on the option '-[n]fc1', but
they look exactly the same. There are several possibilities for the
leading space in the output.
 1.4 25-Sep-2021  rillig tests/indent: demonstrate mergin of comments

This may or may not have been intended. Especially with the option
'-nfc1' the result looks confusing. It's not a case that occurs every
day, though.
 1.3 24-Sep-2021  rillig tests/indent: demonstrate inconsistent formatting of comments
 1.2 06-Mar-2021  rillig tests/indent: add 17 more tests, found only a single new bug

Discovering one bug in 17 command line options is acceptable. This
compensates the bad first impression I got in the previous batch of
tests, which consisted of 11 tests and found 8 bugs.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 06-Mar-2021  rillig tests/indent: add more tests, discover more bugs
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 11-Oct-2021  rillig tests/indent: finally found some "optional" blank lines
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 11-Oct-2021  rillig tests/indent: finally found some "optional" blank lines
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.5 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.4 11-Oct-2021  rillig tests/indent: finally found some "optional" blank lines
 1.3 11-Oct-2021  rillig tests/indent: add more tests for -sob; nothing is swallowed at all
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.5 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.4 11-Oct-2021  rillig tests/indent: finally found some "optional" blank lines
 1.3 11-Oct-2021  rillig tests/indent: add more tests for -sob; nothing is swallowed at all
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.3 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 08-Oct-2021  rillig tests/indent: demonstrate uncounted comments
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.4 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 08-Oct-2021  rillig tests/indent: demonstrate uncounted comments
 1.2 07-Mar-2021  rillig tests/indent: add tests for the remaining command line options
 1.1 06-Mar-2021  rillig tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests. To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 07-Oct-2021  rillig tests/indent: test parsing of command line options in profile file
 1.4 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.3 17-Oct-2021  rillig indent: parse int command line options strictly

On i386 and other platforms where LONG_MAX == INT_MAX, the test
t_errors/option_tabsize_very_large failed since the behavior on integer
overflow differs between ILP32 and LP64 platforms. Noticed by gson@.

Avoid this unintended difference by adding reasonable limits for each of
the integer options and by replacing atoi with strtol.
 1.2 13-Oct-2021  rillig indent: check command line options stricter

Previously, bool options were allowed to have trailing garbage. For
example, the option '-bacc' could be spelled '-bacchus' as well.

Check that the exact option name is given in the command line, to
prevent typos in the configuration files and to reduce surprises just in
case a future option is a prefix of an existing option, or vice versa.

Add a new test program for error handling. Most of these tests are so
simple that it would be overkill to create 3 files for each test.
 1.1 07-Oct-2021  rillig tests/indent: test parsing of command line options in profile file
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 07-Oct-2021  rillig tests/indent: test parsing of command line options in profile file
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 20-Nov-2021  rillig indent: clean up lint annotation and tests
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.5 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.13 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.12 20-May-2023  rillig indent: implement blank lines around conditional compilation
 1.11 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.10 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.9 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.8 23-Apr-2022  rillig indent: group global variables related to output control

No functional change.
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.5 19-Nov-2021  rillig indent: fix formatting of function definitions (since 2019-04-04)

In the definition of a function with a pointer return type, the
formatting depended on the name of the function. Function names
matching [A-Za-z+] were formatted correctly, those containing [$0-9_]
weren't.
 1.4 20-Oct-2021  rillig indent: rename blankline_requested variables

The words 'prefix' and 'postfix' sounded too much like horizontal
concepts, like in operators. The actual purpose of these variables is to
add blank lines before and after the current line, so use the same
wording as in the command line options.

No functional change.
 1.3 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.2 16-Oct-2021  rillig tests/indent: restructure test for '-bacc' and '-nbacc'

To see the effects of the options, group the tests into sections, each
containing a small piece of code followed by the output of the two
options.
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.13 22-Oct-2023  rillig tests/indent: clean up comments
 1.12 26-Jun-2023  rillig indent: in -bad mode, don't add a blank line above a comment or '}'
 1.11 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.10 14-May-2023  rillig indent: fix vertical spacing after declarations

A comment is not supposed to change the state of the 'blank line after
declaration', but it did. The initialization of saved_just_saw_decl was
wrong though since it tried to capture the previous value after it had
already been overwritten.
 1.9 13-May-2023  rillig indent: implement 'blank after declarations'
 1.8 13-May-2023  rillig tests/indent: extend test for blank line after declaration
 1.7 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.3 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.2 16-Oct-2021  rillig tests/indent: clean up tests for '-bad' and '-badp'
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.16 27-Jun-2023  rillig indent: fix 'blank line above first statement in function body'
 1.15 27-Jun-2023  rillig tests/indent: test the -badp option
 1.14 26-Jun-2023  rillig indent: implement 'blank line above first statement in function body'
 1.13 26-Jun-2023  rillig tests/indent: extend test for -badp option
 1.12 04-Jun-2023  rillig tests/indent: clean up comments
 1.11 15-May-2023  rillig tests/indent: -badp should not add blank lines in initializers
 1.10 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.9 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.8 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 20-Nov-2021  rillig indent: clean up lint annotation and tests
 1.5 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 17-Oct-2021  rillig tests/indent: remove redundant test output for -nbap
 1.2 16-Oct-2021  rillig tests/indent: clean up tests for '-bad' and '-badp'
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.11 23-Jun-2023  rillig tests/indent: fix comments
 1.10 16-Jun-2023  rillig indent: don't force a blank line between '}' and preprocessing line
 1.9 23-May-2023  rillig tests/indent: add code snippets found in make and lint1
 1.8 20-May-2023  rillig indent: don't insert blank line between two closing lines
 1.7 20-May-2023  rillig indent: implement blank line after function body
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.3 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.2 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.5 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 23-Oct-2021  rillig tests/indent: migrate test for '-bap -sob' to t_options
 1.11 18-Jun-2023  rillig indent: only add blank lines before actual block comments
 1.10 18-Jun-2023  rillig indent: test block comments and the -bbb option
 1.9 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.8 20-May-2023  rillig indent: implement blank line above block comment
 1.7 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.13 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.12 14-Jun-2023  rillig indent: clean up the code, add a few tests
 1.11 14-Jun-2023  rillig indent: allow more than 20 nested parentheses or brackets
 1.10 10-Jun-2023  rillig indent: fix token classification in declarations

As a side effect, indent handles _Generic from C11 properly now, at
least in -nlp mode.
 1.9 10-Jun-2023  rillig indent: rename and sort variables in parser state

No functional change.
 1.8 02-Jun-2023  rillig indent: fix formatting of declarations with preprocessing lines
 1.7 02-Jun-2023  rillig tests/indent: demonstrate bugs when formatting preprocessing lines
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.10 03-Jan-2025  rillig indent: fix line breaks in else-if sequences

The flag ps.want_newline did not adequately model the conditions under
which a line break should be inserted, thus the redesign.

A welcome side effect is that in statements like 'if (cond);', the
semicolon is now placed on a separate line, thus becoming more visible.
 1.9 21-May-2023  rillig branches: 1.9.2;
tests/indent: fix outdated or wrong comments
 1.8 11-May-2023  rillig indent: add debug output for tracking comments and braces
 1.7 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 20-Nov-2021  rillig indent: clean up lint annotation and tests
 1.3 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.2 07-Nov-2021  rillig indent: fix handling of C99 comments after 'if (expr)'
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.10 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.9 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.8 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.7 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.6 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.5 26-Oct-2021  rillig tests/indent: test edge cases for blank after sizeof
 1.4 24-Oct-2021  rillig tests/indent: test interaction between -pcs and -bs
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.5 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.10 09-Jun-2023  rillig indent: preserve block comments with delimiters
 1.9 19-May-2023  rillig tests/indent: test multi-line comments with -ncdb
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 20-Nov-2021  rillig tests/indent: clean up test for the options '-cdb' and '-ncdb'
 1.5 07-Nov-2021  rillig indent: only access buffer data in the range [buf.s, buf.e)

No functional change.
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.7 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.11 10-Jun-2023  rillig indent: fix indentation of continuation lines in initializers
 1.10 09-Jun-2023  rillig indent: indent multi-line expressions according to parentheses

This reverts the FreeBSD change from 2004-02-12 that had been imported
on 2019-04-04.
 1.9 18-May-2023  rillig indent: manually wrap overly long lines

No functional change.
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.6 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.5 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.4 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.3 01-Nov-2021  rillig indent: fix missing blank after 'return' (since 2021-10-31)

In indent.c 1.200 from 2021-10-31, the subtypes of identifier tokens
were removed since they were redundant. An unintended side effect was
that a parenthesized expression after 'return' was no longer separated
by a blank.

Before that change, 'return' was tokenized as an lsym_ident with subtype
kw_other, and want_space_before_lparen handled this case in the last
line. After the change, 'return' was treated as an ordinary identifier,
and unless the option '-pcs' (blank after function call) was given, the
blank was removed.

The other keywords that had kw_other are not affected since they do not
expect a '(' afterwards. These keywords are 'break', 'continue', 'goto',
'inline' and 'restrict'.

Curiously, there was not a single test case that covered 'return(expr)'.

While here, remove the trailing ',' from the enum lexer_symbol, which is
not allowed in standard C, it is a GNU extension. Lint doesn't complain
about this since the default LINTFLAGS include '-g' for GCC mode.
 1.2 01-Nov-2021  rillig tests/indent: test option '-ci'

There are quite a few tricky special cases, but as they are all listed
in the manual page, they are not surprising.
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.7 10-Jun-2023  rillig indent: fix stack overflow, add more tests

For several parser symbols, 2 symbols are pushed in a row, which led to
an out-of-bounds write.
 1.6 06-Jun-2023  rillig indent: compute indentation of 'case' labels on-demand

One less moving part to keep track of.

No functional change.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 28-Nov-2021  rillig tests/indent: migrate test token_case_label to lsym_case_label
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 07-Nov-2021  rillig tests/indent: test cast, line counting, comment in struct
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.5 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.5 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.4 24-Oct-2021  rillig indent: fix indentation of ad-hoc tagged variables

Seen among others in usr.bin/indent/lexi.c, variable 'keywords'.
 1.3 24-Oct-2021  rillig tests/indent: demonstrate wrong indentation for initialized variable
 1.2 24-Oct-2021  rillig tests/indent: add more tests for option '-di'
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.9 26-Jun-2023  rillig tests/indent: strengthen requirements for test input files

Previously, 'indent run-equals-prev-output' was allowed even when there
was no 'indent run' section above. This created an ambiguity, since
'previous output' could mean either the 'indent run' section or the
'indent run-equals-input' section.
 1.8 05-Jun-2023  rillig tests/indent: add test for left-justifying declarations
 1.7 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.6 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.5 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.4 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.3 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.2 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.15 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.14 09-Jun-2023  rillig indent: when an indentation is ambiguous, indent one level further

The '-eei' mode now applies whenever the indentation from a multi-line
expression could be confused with a following statement.
 1.13 09-Jun-2023  rillig tests/indent: test extra indentation in expressions
 1.12 15-May-2023  rillig indent: fix indentation of statements after controlling expression
 1.11 15-May-2023  rillig tests/indent: add another test for -eei -nlp
 1.10 15-May-2023  rillig indent: fix indentation of expressions in -nlp -eei mode
 1.9 15-May-2023  rillig tests/indent: test extra indentation with fixed continuation indentation
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.5 07-Nov-2021  rillig tests/indent: demonstrate buggy combination of '-eei' and '-nlp'

Seen in indent.c.
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.7 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.6 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.5 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.11 14-May-2023  rillig indent: fix handling of multiple block comments in a line
 1.10 14-May-2023  rillig indent: in comments, keep a leading tab

This kind of comments is used for the CVS IDs at the top of files.
 1.9 13-May-2023  rillig indent: do not add a space before a comment that starts a line
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 25-Nov-2021  rillig indent: fix accidentally joined and broken comments (since 2019-04-04)

The fixed version is not perfect as it gets the indentation of the last
line of the first comment wrong, but at least indent doesn't generate
malformed output anymore.
 1.5 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.6 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.5 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.7 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.6 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.5 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.2 24-Oct-2021  rillig indent: fix indentation of ad-hoc tagged variables

Seen among others in usr.bin/indent/lexi.c, variable 'keywords'.
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.10 09-Jun-2023  rillig indent: indent multi-line expressions according to parentheses

This reverts the FreeBSD change from 2004-02-12 that had been imported
on 2019-04-04.
 1.9 08-Jun-2023  rillig indent: fix indentation in multi-line else-if conditions
 1.8 08-Jun-2023  rillig tests/indent: extend test for wrong indentation in 'else if'
 1.7 23-May-2023  rillig tests/indent: add code snippets found in make and lint1
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.8 10-Jun-2023  rillig indent: fix indentation of continuation lines in initializers
 1.7 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.6 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.5 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.18 16-Jun-2023  rillig indent: fix spacing between postfix operator and left parenthesis
 1.17 14-Jun-2023  rillig indent: allow more than 20 nested parentheses or brackets
 1.16 18-May-2023  rillig indent: document the funcname token
 1.15 15-May-2023  rillig indent: fix type cast in function definition
 1.14 15-May-2023  rillig indent: fix spacing between function prototype and attributes
 1.13 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.12 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.11 25-Nov-2021  rillig tests/indent: remove unnecessary option for testing '-pcs'

Before lexi.c 1.157 from 2021-11-25, the option '-npsl' had been
necessary to prevent a wrong line break, as indent wrongly interpreted
the function declaration as a function definition, just because the
first ')' in the declaration line was not immediately followed by a ','
or ';'.
 1.10 25-Nov-2021  rillig indent: fix space after function name for option '-pcs'
 1.9 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.8 31-Oct-2021  rillig indent: for '-pcs', add blank between function and '('

Before indent-2021.09.30.21.48.12, the blank had always been added, even
in '-npcs' mode. Since then, the blank had never been added.

Now, add the blank in '-pcs' mode and omit it in '-npcs' mode.
 1.7 31-Oct-2021  rillig tests/indent: test function declaration with '-pcs' and '-npcs'

The conditions in want_blank_before_lparen are not ordered correctly.
opt.proc_calls_space should override ')('.
 1.6 31-Oct-2021  rillig tests/indent: test indirect function call with '-pcs' and '-npcs'
 1.5 24-Oct-2021  rillig tests/indent: test interaction between -pcs and -bs
 1.4 24-Oct-2021  rillig tests/indent: add test for sizeof and offsetof with -pcs
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.5 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.8 17-Jun-2023  rillig tests/indent: add miscellaneous test cases found during clean up
 1.7 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.6 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.5 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.4 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.10 05-Jun-2023  rillig indent: don't remove blank line after 'if (expr) {'
 1.9 02-Jun-2023  rillig indent: clean up

Only print the 'token' buffer in debug mode if it is interesting, group
the blocks in handling of '(' tokens by topic, remove obsolete comment
from test.
 1.8 23-May-2023  rillig tests/indent: add code snippets found in make and lint1
 1.7 22-May-2023  rillig indent: implement suppressing optional blank lines
 1.6 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.6 15-May-2023  rillig indent: fix type cast in function definition
 1.5 15-May-2023  rillig indent: fix spacing between function prototype and attributes
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.2 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.13 05-Jun-2023  rillig indent: do not report broken lines, report configuration on stderr
 1.12 12-May-2023  rillig indent: remove statistics

The numbers from the statistics were wrong.
 1.11 11-May-2023  rillig indent: don't touch comments in preprocessing lines

The indentation of multi-line comments was wrong, and the code for
handling them was too complicated.
 1.10 11-May-2023  rillig indent: remove broken code for handling blank lines

This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
 1.9 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.8 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.7 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.6 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.5 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.4 07-Nov-2021  rillig tests/indent: test cast, line counting, comment in struct
 1.3 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.2 16-Oct-2021  rillig tests/lint: document and extend the tests for options
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 28-Oct-2021  rillig indent: change product name, update version number

NetBSD's indent has deviated enough from FreeBSD's indent to warrant a
different product name. When indent was copied from FreeBSD in 2019,
that update introduced several new bugs, some of which have been fixed
in the NetBSD version.

NetBSD indent, unlike FreeBSD indent, supports C99 comments and C99
initializer designators.
 1.1 23-Oct-2021  rillig tests/indent: migrate test for '--version' to t_options
 1.3 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.2 06-Mar-2021  rillig tests/indent: fix unintended trailing whitespace and space-tab
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file parens.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file parens.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.3 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.2 30-Sep-2021  rillig indent: remove space between ')' and '(' in declarations
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file parens.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: remove redundant tests for '-ncs' and '-pcs'

These tests are already covered by opt_cs.c and opt_pcs.c.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file pcs.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: remove redundant tests for '-ncs' and '-pcs'

These tests are already covered by opt_cs.c and opt_pcs.c.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file pcs.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 18-Oct-2021  rillig tests/indent: remove redundant tests for '-ncs' and '-pcs'

These tests are already covered by opt_cs.c and opt_pcs.c.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file pcs.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.3 18-Oct-2021  rillig tests/indent: condense test for indentation level, add missing files
 1.2 05-Oct-2021  rillig indent: make off-by-one error in main_prepare_parsing more visible

No functional change.
 1.1 05-Oct-2021  rillig tests/indent: demonstrate off-by-one error in edge case
 1.2 18-Oct-2021  rillig tests/indent: condense test for indentation level, add missing files
 1.1 05-Oct-2021  rillig tests/indent: demonstrate off-by-one error in edge case
 1.4 18-Oct-2021  rillig tests/indent: condense test for indentation level, add missing files
 1.3 05-Oct-2021  rillig tests/indent: document missing space between '){'
 1.2 05-Oct-2021  rillig indent: fix off-by-one error for indented first line
 1.1 05-Oct-2021  rillig tests/indent: demonstrate off-by-one error in edge case
 1.9 15-Jun-2023  rillig indent: miscellaneous cleanups, more tests for edge cases
 1.8 14-Jun-2023  rillig indent: clean up the code, add a few tests
 1.7 15-May-2023  rillig indent: fix spacing between function prototype and attributes
 1.6 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.5 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.4 25-Nov-2021  rillig tests/indent: rename ps.in_parameter_declaration in test as well
 1.3 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.2 30-Oct-2021  rillig tests/indent: test variable indentation with exotic options
 1.1 18-Oct-2021  rillig tests/indent: condense test for indentation level, add missing files
 1.5 14-Jun-2023  rillig indent: clean up handling of comments

One less moving part in the parser state.

No functional change.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 05-Jun-2023  rillig tests/indent: add tests for 'do-while' loops
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 07-Jan-2025  rillig indent: condense and simplify parsing code
 1.4 24-Apr-2022  rillig branches: 1.4.4;
tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.4.4.1 02-Aug-2025  perseant Sync with HEAD
 1.8 07-Jan-2025  rillig indent: fix indentation of comment above 'else'

Previously, indent assumed that no 'else' would follow.
 1.7 16-Jun-2023  rillig branches: 1.7.2;
tests/indent: format stderr output as end-of-line comments

This generates fewer error markers in syntax-aware editors.
 1.6 14-Jun-2023  rillig tests/indent: separate stdout from stderr

Due to buffering, there was no guarantee that the output would be
exactly in the same order as written in the tests.
 1.5 10-Jun-2023  rillig indent: fix stack overflow, add more tests

For several parser symbols, 2 symbols are pushed in a row, which led to
an out-of-bounds write.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 07-Jan-2025  rillig indent: fix indentation of statement after deeply nested 'if'
 1.6 15-May-2023  rillig branches: 1.6.2;
indent: fix spacing in for loop with declaration (since 2022-02-13)
 1.5 15-May-2023  rillig tests/indent: demonstrate wrong spacing in for loops
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 10-Jun-2023  rillig tests/indent: add move coverage tests
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 23-Apr-2022  rillig tests/indent: migrate a few token tests to psym tests
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 07-Jan-2025  rillig indent: fix indentation of statement after deeply nested 'if'
 1.4 24-Apr-2022  rillig branches: 1.4.4;
tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 23-Apr-2022  rillig tests/indent: migrate a few token tests to psym tests
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.4.4.1 02-Aug-2025  perseant Sync with HEAD
 1.7 03-Jan-2025  rillig indent: fix line breaks in else-if sequences

The flag ps.want_newline did not adequately model the conditions under
which a line break should be inserted, thus the redesign.

A welcome side effect is that in statements like 'if (cond);', the
semicolon is now placed on a separate line, thus becoming more visible.
 1.6 03-Jan-2025  rillig tests/indent: demonstrate wrong indentation in multi-line else-if
 1.5 11-May-2023  rillig branches: 1.5.2;
indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 23-Apr-2022  rillig tests/indent: migrate a few token tests to psym tests
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5 16-Jun-2023  rillig tests/indent: format stderr output as end-of-line comments

This generates fewer error markers in syntax-aware editors.
 1.4 14-Jun-2023  rillig indent: clean up the code, add a few tests
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.4 12-May-2023  rillig tests/indent: test pushing the placeholder symbol to the parser stack
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.7 14-Jun-2023  rillig indent: merge parser symbols for stmt and stmt_list

They were handled in exactly the same way.
 1.6 09-Jun-2023  rillig indent: don't treat function call expressions as cast expressions
 1.5 09-Jun-2023  rillig tests/indent: add real-life test cases from make(1) and lint(1)
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6 14-Jun-2023  rillig indent: merge parser symbols for stmt and stmt_list

They were handled in exactly the same way.
 1.5 02-Jun-2023  rillig indent: force each statement on a new line

Previously, '{} while (cond)' was kept on a single line, even though the
'while' was independent of the '{}'.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6 23-Jun-2023  rillig tests/indent: fix comments
 1.5 06-Jun-2023  rillig indent: compute indentation of 'case' labels on-demand

One less moving part to keep track of.

No functional change.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.6 03-Jan-2025  rillig indent: fix line breaks in else-if sequences

The flag ps.want_newline did not adequately model the conditions under
which a line break should be inserted, thus the redesign.

A welcome side effect is that in statements like 'if (cond);', the
semicolon is now placed on a separate line, thus becoming more visible.
 1.5 02-Jun-2023  rillig branches: 1.5.2;
indent: force each statement on a new line

Previously, '{} while (cond)' was kept on a single line, even though the
'while' was independent of the '{}'.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Nov-2021  rillig tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack. They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests. This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file struct.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file struct.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file surplusbad.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file surplusbad.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file surplusbad.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.39 03-Jan-2025  rillig indent: fix line breaks in else-if sequences

The flag ps.want_newline did not adequately model the conditions under
which a line break should be inserted, thus the redesign.

A welcome side effect is that in statements like 'if (cond);', the
semicolon is now placed on a separate line, thus becoming more visible.
 1.38 10-Dec-2023  rillig branches: 1.38.2;
tests/indent: fix name of test case
 1.37 14-Jun-2023  rillig indent: allow more than 128 brace levels
 1.36 14-Jun-2023  rillig indent: allow more than 5 levels of #if/#endif
 1.35 10-Jun-2023  rillig indent: fix stack overflow, add more tests

For several parser symbols, 2 symbols are pushed in a row, which led to
an out-of-bounds write.
 1.34 09-Jun-2023  rillig indent: support C99 compound literals
 1.33 05-Jun-2023  rillig indent: fix trailing whitespace after comment
 1.32 04-Jun-2023  rillig tests/indent: cover code in lexi.c
 1.31 04-Jun-2023  rillig indent: fix formatting of compound expressions, at least partially
 1.30 21-May-2023  rillig tests/indent: fix outdated or wrong comments
 1.29 21-May-2023  rillig indent: don't error out on unrecognized preprocessor directives

This allows indent to be used on the GCC preprocessor output.
 1.28 14-May-2023  rillig indent: miscellaneous cleanups
 1.27 13-May-2023  rillig indent: do not add a space before a comment that starts a line
 1.26 13-May-2023  rillig indent: preserve indentation of preprocessor directives
 1.25 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.24 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.23 13-Feb-2022  rillig tests/indent: demonstrate the poor handling of compound literals
 1.22 25-Nov-2021  rillig indent: make error message for missing command line arguments clearer
 1.21 25-Nov-2021  rillig tests/indent: use escape sequence for newline characters

No functional change.
 1.20 07-Nov-2021  rillig indent: parse special options strictly
 1.19 07-Nov-2021  rillig tests/indent: test lenient option parsing
 1.18 07-Nov-2021  rillig indent: remove redundant assignment

At that point, ps.next_col_1 is already false.

No functional change.
 1.17 30-Oct-2021  rillig indent: fix assertion in fits_in_one_line
 1.16 30-Oct-2021  rillig tests/indent: demonstrate assertion failure in fits_in_one_line
 1.15 30-Oct-2021  rillig indent: revert previous fix of assertion failure

The strange code with the out of bounds memory access is needed to
transform 'if (expr) /* comment */ {' to 'if (expr) { /* comment */',
that is, to move the comment to the right.

Add a test that prevents "repairing" this code again.
 1.14 30-Oct-2021  rillig indent: fix assertion failure in search_stmt_comment

I have no idea why the code was written in such a convoluted way before.
By removing all the code that didn't make sense, everything just works
as expected, and the existing tests all pass, especially those in
token_comment.c that mention search_stmt_comment.
 1.13 29-Oct-2021  rillig indent: replace segmentation fault with assertion
 1.12 29-Oct-2021  rillig tests/indent: demonstrate segmentation fault in search_stmt_comment
 1.11 29-Oct-2021  rillig indent: spell 'parentheses' properly in messages and comments
 1.10 29-Oct-2021  rillig tests/indent: provoke the third occurrence of 'unbalanced parens'
 1.9 29-Oct-2021  rillig tests/indent: provoke error messages for unbalanced parentheses
 1.8 28-Oct-2021  rillig indent: fix error message for buffer overflow during option parsing

At this early time, the input file has not been opened yet, so there is
no reason to output either the input file name or the line number.
 1.7 28-Oct-2021  rillig indent: make error messages for option parsing more precise
 1.6 28-Oct-2021  rillig indent: parse option '-cli' strictly
 1.5 24-Oct-2021  rillig indent: clean up format of warnings and errors

Previously, warnings and errors had the form of C block comments. Before
NetBSD io.c 1.20 from 2019-10-19, this format made sense because the
diagnostics could end up in the same output stream as the formatted
output.

Since NetBSD io.c 1.20 from 2019-10-19, all diagnostics are redirected
to stderr. This change was not mentioned in the commit message back
then, it makes sense nevertheless. Since stdout and stderr now are
properly separated, there is no need anymore to keep the weird format
for warnings and errors. Switch to the standard 'error: file:line'
format.

Move the function 'diag' to indent.c to have access to the name of the
current input file.
 1.4 17-Oct-2021  rillig indent: parse int command line options strictly

On i386 and other platforms where LONG_MAX == INT_MAX, the test
t_errors/option_tabsize_very_large failed since the behavior on integer
overflow differs between ILP32 and LP64 platforms. Noticed by gson@.

Avoid this unintended difference by adding reasonable limits for each of
the integer options and by replacing atoi with strtol.
 1.3 14-Oct-2021  rillig tests/indent: cover more error cases and inline indentation
 1.2 14-Oct-2021  rillig tests/indent: provide full line coverage for argument handling
 1.1 13-Oct-2021  rillig indent: check command line options stricter

Previously, bool options were allowed to have trailing garbage. For
example, the option '-bacc' could be spelled '-bacchus' as well.

Check that the exact option name is given in the command line, to
prevent typos in the configuration files and to reduce surprises just in
case a future option is a prefix of an existing option, or vice versa.

Add a new test program for error handling. Most of these tests are so
simple that it would be overkill to create 3 files for each test.
 1.38.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.7 25-Sep-2021  rillig tests/indent: clean up test driver

For most of the test data, it was not necessary to copy the files to the
working directory, even though the comment said so. The test data had
been taken from the cleaned files anyway.

Use sed instead of cp to copy the files, to allow for comments in all
kind of files, even the type lists for the option '-U'.
 1.6 25-Sep-2021  rillig tests/indent: fix ShellCheck warnings, use simple variables
 1.5 24-Sep-2021  rillig tests/indent: demonstrate token repetition after line-end comment
 1.4 08-Mar-2021  rillig tests/indent: demonstrate wrong removed empty line before '//'
 1.3 08-Mar-2021  rillig tests/indent: allow golden stderr file, improve filenames, clean up code

When indent runs in filter mode, it may output messages to stderr.
Allow tests with non-empty expected stderr.

In the ATF output, the filename 'output_file.parsed' was not helpful for
casual readers of diff output since they expect the filenames to be
meaningful. Embed the name of the test case in that filename.

Fix quoting of the shell variables.

Remove the repetition of the regular expression to clean up the test
files.
 1.2 07-Mar-2021  rillig tests/indent: allow for comments in either the input or output files
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file t_indent.sh was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.29 17-Dec-2023  rillig tests/indent: don't create an unneeded file
 1.28 10-Dec-2023  rillig indent: be strict about options from profile files

Previously, the "option" 'xdi0' was treated the same as '-xdi0'.
 1.27 05-Jun-2023  rillig indent: do not report broken lines, report configuration on stderr
 1.26 05-Jun-2023  rillig indent: clean up handling of whitespace

No functional change.
 1.25 15-May-2023  rillig indent: remove accidental space before tab
 1.24 13-May-2023  rillig indent: preserve indentation of preprocessor directives
 1.23 13-May-2023  rillig tests/indent: explain, clean up and add some tests
 1.22 12-May-2023  rillig indent: remove statistics

The numbers from the statistics were wrong.
 1.21 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.20 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.19 25-Nov-2021  rillig tests/indent: use escape sequence for newline characters

No functional change.
 1.18 25-Nov-2021  rillig tests/indent: test in-place formatting with parse errors

The file gets formatted until the end, despite the parse error. This may
destroy layout details of the code but usually preserves the overall
structure. Since all source code is supposed to be under version
control, this is not a problem.
 1.17 20-Nov-2021  rillig indent: clean up lint annotation and tests
 1.16 19-Nov-2021  rillig tests/indent: refine and extend tests
 1.15 07-Nov-2021  rillig indent: fix handling of C99 comments after 'if (expr)'
 1.14 07-Nov-2021  rillig indent: demonstrate controlled buffer overflow in C99 comment
 1.13 07-Nov-2021  rillig tests/indent: test options without '-' in profile files
 1.12 30-Oct-2021  rillig tests/indent: test several options '-P'
 1.11 29-Oct-2021  rillig indent: clean up main_init_globals

No functional change.
 1.10 29-Oct-2021  rillig indent: spell 'parentheses' properly in messages and comments
 1.9 28-Oct-2021  rillig indent: parse option '-cli' strictly
 1.8 24-Oct-2021  rillig indent: clean up format of warnings and errors

Previously, warnings and errors had the form of C block comments. Before
NetBSD io.c 1.20 from 2019-10-19, this format made sense because the
diagnostics could end up in the same output stream as the formatted
output.

Since NetBSD io.c 1.20 from 2019-10-19, all diagnostics are redirected
to stderr. This change was not mentioned in the commit message back
then, it makes sense nevertheless. Since stdout and stderr now are
properly separated, there is no need anymore to keep the weird format
for warnings and errors. Switch to the standard 'error: file:line'
format.

Move the function 'diag' to indent.c to have access to the name of the
current input file.
 1.7 24-Oct-2021  rillig indent: fix line number counting at beginning of function body
 1.6 24-Oct-2021  rillig indent/tests: demonstrate wrong line number counting
 1.5 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.4 22-Oct-2021  rillig tests/indent: migrate integer options tests to t_options
 1.3 22-Oct-2021  rillig tests/indent: migrate a few more tests to t_options
 1.2 14-Oct-2021  rillig tests/indent: cover more error cases and inline indentation
 1.1 14-Oct-2021  rillig tests/indent: provide full line coverage for argument handling
 1.14 20-May-2023  rillig tests/indent: migrate test driver from AWK to Lua

Lua reports more details when os.execute fails, which is useful when
running old versions of indent for comparison. The new test driver also
supports multiple test files in the same run.
 1.13 20-May-2023  rillig tests/indent: clean up test driver

No functional change.
 1.12 15-May-2023  rillig indent: remove accidental space before tab
 1.11 11-May-2023  rillig indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere. The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well. This change is unintended, but it
will be easier to re-add that now that the code is simpler.
 1.10 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.9 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.8 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.7 20-Nov-2021  rillig indent/tests: remove outdated comment

This task was resolved in the previous commit.
 1.6 20-Nov-2021  rillig indent/tests: make warning for empty lines more helpful
 1.5 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.4 20-Nov-2021  rillig tests/indent: clean up test for the options '-cdb' and '-ncdb'
 1.3 18-Nov-2021  rillig tests/indent: reorder code in test driver

No functional change.
 1.2 23-Oct-2021  rillig tests/indent: prevent non-comment text to be ignored in the tests
 1.1 18-Oct-2021  rillig tests/indent: extend tests for labels, extract test driver

Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
 1.8 12-Dec-2024  rillig tests/indent: clean up test driver
 1.7 26-Jun-2023  rillig branches: 1.7.2;
tests/indent: strengthen requirements for test input files

Previously, 'indent run-equals-prev-output' was allowed even when there
was no 'indent run' section above. This created an ambiguity, since
'previous output' could mean either the 'indent run' section or the
'indent run-equals-input' section.
 1.6 16-Jun-2023  rillig tests/indent: format stderr output as end-of-line comments

This generates fewer error markers in syntax-aware editors.
 1.5 14-Jun-2023  rillig tests/indent: separate stdout from stderr

Due to buffering, there was no guarantee that the output would be
exactly in the same order as written in the tests.
 1.4 22-May-2023  rillig tests/indent: skip creating an intermediate file in tests
 1.3 21-May-2023  rillig tests/indent: fix outdated or wrong comments
 1.2 20-May-2023  rillig tests/indent: prevent 'indent end' with arguments
 1.1 20-May-2023  rillig tests/indent: migrate test driver from AWK to Lua

Lua reports more details when os.execute fails, which is useful when
running old versions of indent for comparison. The new test driver also
supports multiple test files in the same run.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.11 20-May-2023  rillig tests/indent: migrate test driver from AWK to Lua

Lua reports more details when os.execute fails, which is useful when
running old versions of indent for comparison. The new test driver also
supports multiple test files in the same run.
 1.10 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.9 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.8 18-Oct-2021  rillig tests/indent: extend tests for labels, extract test driver

Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
 1.7 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.6 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.5 18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.4 17-Oct-2021  rillig tests/lint: use zero-indexed array in awk test program

No functional change.
 1.3 17-Oct-2021  rillig tests/indent: remove redundant test output for -nbap
 1.2 16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1 16-Oct-2021  rillig tests/indent: condense tests for bool options

Previously, each bool option such as '-bacc/-nbacc' had 6 test files:
input, options, output for the positive and negative option. Splitting
this test data into separate files made it harder than necessary to
quickly compare the test output from '-bacc' with that of '-nbacc'.

Have a single test for the positive and negative option, allowing
several tests to run on the same input with different options.

This commit only contains the rather mechanic changes of concatenating
the previous test files and inserting the '#indent' directives, which
are documented in t_options.sh. Removing duplicate input sections, as
well as other cleanups will follow soon.

No functional change.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 12-Mar-2021  rillig tests/indent: test tokenization of punctuation, mainly operators
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 12-Mar-2021  rillig tests/indent: test tokenization of punctuation, mainly operators
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 12-Mar-2021  rillig tests/indent: test tokenization of punctuation, mainly operators
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 08-Oct-2021  rillig tests/indent: test formatting of the token ':'
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 08-Oct-2021  rillig tests/indent: test formatting of the token ':'
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.13 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.12 14-Oct-2021  rillig tests/indent: test comment to the right, collect more useful tests
 1.11 12-Oct-2021  rillig indent: fix formatting of single-line comments (since today)

The change in pr_comment.c 1.70 from 3 hours ago did not cover all edge
cases correctly. Now it works for comments that are aligned with tabs.
 1.10 12-Oct-2021  rillig tests/indent: test more single-line comments
 1.9 12-Oct-2021  rillig tests/indent: test formatting of long single-line code comments
 1.8 12-Oct-2021  rillig tests/indent: test long code comments
 1.7 08-Oct-2021  rillig tests/indent: demonstrate spaces around comment
 1.6 08-Oct-2021  rillig tests/indent: test formatting of a chaotic boxed comment
 1.5 05-Oct-2021  rillig tests/indent: test INDENT comments
 1.4 05-Oct-2021  rillig tests/indent: test indentation of nested declarations and statements
 1.3 05-Oct-2021  rillig indent: test various forms of comments
 1.2 14-Mar-2021  rillig tests/indent: demonstrate off-by-one error in comment processing
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.2 05-Oct-2021  rillig indent: test various forms of comments
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.15 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.14 14-Oct-2021  rillig tests/indent: test comment to the right, collect more useful tests
 1.13 12-Oct-2021  rillig indent: fix formatting of single-line comments (since today)

The change in pr_comment.c 1.70 from 3 hours ago did not cover all edge
cases correctly. Now it works for comments that are aligned with tabs.
 1.12 12-Oct-2021  rillig tests/indent: test more single-line comments
 1.11 12-Oct-2021  rillig tests/indent: test formatting of long single-line code comments
 1.10 12-Oct-2021  rillig tests/indent: test long code comments
 1.9 12-Oct-2021  rillig indent: fix wrapping for comments in otherwise empty lines

The comment above the code was wrong. The leading 3 characters were
indeed ignored, but the first of them was '/', not ' '. Of the trailing
3 characters, 2 were not ignored. The start and end of the comment would
not cancel out, they would rather sum up.
 1.8 08-Oct-2021  rillig tests/indent: demonstrate spaces around comment
 1.7 08-Oct-2021  rillig tests/indent: test formatting of a chaotic boxed comment
 1.6 05-Oct-2021  rillig tests/indent: test INDENT comments
 1.5 05-Oct-2021  rillig tests/indent: test indentation of nested declarations and statements
 1.4 05-Oct-2021  rillig indent: test various forms of comments
 1.3 14-Mar-2021  rillig indent: fix off-by-one error in comment wrapping

The manual page says that the default maximum length of a comment line
is 78. The test 'comments.0' wrongly assumed that this 78 would refer
to the maximum _column_ allowed, which is off by one.

Fix the wording in the test 'comments.0' and remove the (now satisfied)
expectation comments in the test 'token-comment.0'.

Several other tests just happened to hit that limit, fix these as well.
 1.2 14-Mar-2021  rillig tests/indent: demonstrate off-by-one error in comment processing
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 14-Mar-2021  rillig indent: fix off-by-one error in comment wrapping

The manual page says that the default maximum length of a comment line
is 78. The test 'comments.0' wrongly assumed that this 78 would refer
to the maximum _column_ allowed, which is off by one.

Fix the wording in the test 'comments.0' and remove the (now satisfied)
expectation comments in the test 'token-comment.0'.

Several other tests just happened to hit that limit, fix these as well.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 08-Oct-2021  rillig indent: clean up 'parse', add test for dangling else

No functional change.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 08-Oct-2021  rillig indent: clean up 'parse', add test for dangling else

No functional change.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.4 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.3 30-Sep-2021  rillig tests/indent: add more tests with ')(', found bug in '//'
 1.2 28-Sep-2021  rillig tests/indent: demonstrate missing space before designated initializer

Seen in usr.bin/indent/lexi.c, num_lex_row.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 28-Sep-2021  rillig tests/indent: demonstrate missing space before designated initializer

Seen in usr.bin/indent/lexi.c, num_lex_row.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.6 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.5 30-Sep-2021  rillig tests/indent: add more tests with ')(', found bug in '//'
 1.4 30-Sep-2021  rillig indent: remove space between ')' and '(' in declarations
 1.3 30-Sep-2021  rillig indent: add space between ',' and '[' in C99 initializations
 1.2 28-Sep-2021  rillig tests/indent: demonstrate missing space before designated initializer

Seen in usr.bin/indent/lexi.c, num_lex_row.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.7 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.6 09-Oct-2021  rillig tests/indent: test fixing of invalid preprocessor directives
 1.5 08-Oct-2021  rillig tests/indent: test that indent remembers unary/binary operators
 1.4 08-Oct-2021  rillig indent: demonstrate bug in parsing preprocessor lines
 1.3 13-Mar-2021  rillig tests/indent: add another test case for preprocessing directives

In process_preprocessing, the variable 'quote' is not used, which makes
the code suspicious of not handling the combination of string literals
and comments properly.
 1.2 12-Mar-2021  rillig tests/indent: add test for preprocessor lines
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.9 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.8 09-Oct-2021  rillig tests/indent: test fixing of invalid preprocessor directives
 1.7 08-Oct-2021  rillig tests/indent: test that indent remembers unary/binary operators
 1.6 08-Oct-2021  rillig indent: fix parsing of preprocessor lines with comments and strings
 1.5 08-Oct-2021  rillig indent: demonstrate bug in parsing preprocessor lines
 1.4 13-Mar-2021  rillig indent: fix handling of '/*' in string literal in preprocessing line

Previously, the '/*' in the string literal had been interpreted as the
beginning of a comment, which was wrong. Because of that, the variable
declaration in the following line was still interpreted as part of the
comment. The comment even continued until the end of the file.

Due to indent's forgiving nature, it neither complained nor even
mentioned that anything had gone wrong. The decision of rather
producing wrong output than failing early is a dangerous one.

At least, there should have been an error message that at the end of the
file, the parser was still in a a comment, expecting the closing '*/'.
 1.3 13-Mar-2021  rillig tests/indent: add another test case for preprocessing directives

In process_preprocessing, the variable 'quote' is not used, which makes
the code suspicious of not handling the combination of string literals
and comments properly.
 1.2 12-Mar-2021  rillig tests/indent: add test for preprocessor lines
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 25-Sep-2021  rillig tests/indent: test formatting of while and do-while loops
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.3 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 25-Sep-2021  rillig tests/indent: test formatting of while and do-while loops
 1.1 12-Mar-2021  rillig tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way. These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.
 1.14 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.13 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.12 23-Apr-2022  rillig tests/indent: add tests for unary and binary operators
 1.11 23-Apr-2022  rillig tests/indent: migrate tests for unary and binary operators
 1.10 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.9 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.8 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.7 04-Nov-2021  rillig indent: fix joining of adjacent unary '+' operators
 1.6 30-Oct-2021  rillig indent: rename prev_newline and prev_col_1 to curr

These two flags describe the token that is currently processed.

In process_binary_op, curr_newline can never be true since newline is
not a binary operator, so remove that condition.

No functional change.
 1.5 29-Oct-2021  rillig tests/indent: test binary operators for tokens in column 1
 1.4 29-Oct-2021  rillig indent: fix missing blank before binary operator
 1.3 26-Oct-2021  rillig tests/indent: document cause for missing space between ')' and '='
 1.2 26-Oct-2021  rillig tests/indent: demonstrate missing space before '='

Reported by RVP via private mail. Broken since the import of FreeBSD
indent in 2019.

indent-2000.10.11.14.46.04
| char *(*fn) (int) = NULL;
indent-2019.02.03.03.19.29

indent-2019.04.04.15.27.35
| char *(* fn) (int)= NULL;
indent-2021.09.30.21.38.43

indent-2021.09.30.21.48.12
| char *(* fn)(int)= NULL;
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 28-Nov-2021  rillig tests/indent: migrate test token_case_label to lsym_case_label
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.3 28-Nov-2021  rillig tests/indent: move test for ':' to lsym_token.c
 1.2 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.3 28-Nov-2021  rillig tests/indent: migrate token_comma to lsym_comma

The section on initializer values is new.
 1.2 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.31 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.30 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.29 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.28 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.27 27-Nov-2021  rillig indent: rename dump functions to output

No functional change.
 1.26 25-Nov-2021  rillig indent: fix accidentally joined and broken comments (since 2019-04-04)

The fixed version is not perfect as it gets the indentation of the last
line of the first comment wrong, but at least indent doesn't generate
malformed output anymore.
 1.25 25-Nov-2021  rillig tests/indent: demonstrate bugs in comment processing
 1.24 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.23 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.22 07-Nov-2021  rillig tests/indent: improve code coverage for processing comments
 1.21 07-Nov-2021  rillig indent: remove dead code in analyze_comment

The case of an otherwise empty line is already handled further above.
 1.20 07-Nov-2021  rillig indent: make copy_comment_nowrap simpler

Since a nowrap comment is copied unmodified, it need not depend on any
maximum line length.

No functional change.
 1.19 07-Nov-2021  rillig indent: rename type_at_paren_level_0 to type_outside_parentheses

For symmetry with type_in_parentheses.

No functional change.
 1.18 05-Nov-2021  rillig indent: rename ps.curr_newline to next_col_1

For symmetry with ps.curr_col_1.

No functional change.
 1.17 04-Nov-2021  rillig indent: fix parsing of C99 comments containing '*/'
 1.16 04-Nov-2021  rillig tests/indent: demonstrate wrong edge case in C99 comments
 1.15 30-Oct-2021  rillig indent: rename prev_newline and prev_col_1 to curr

These two flags describe the token that is currently processed.

In process_binary_op, curr_newline can never be true since newline is
not a binary operator, so remove that condition.

No functional change.
 1.14 30-Oct-2021  rillig indent: fix assertion in fits_in_one_line
 1.13 30-Oct-2021  rillig indent: revert previous fix of assertion failure

The strange code with the out of bounds memory access is needed to
transform 'if (expr) /* comment */ {' to 'if (expr) { /* comment */',
that is, to move the comment to the right.

Add a test that prevents "repairing" this code again.
 1.12 30-Oct-2021  rillig tests/indent: add more tests for the assertion in search_stmt_comment
 1.11 30-Oct-2021  rillig tests/indent: test preserving the internal layout of box comments
 1.10 30-Oct-2021  rillig tests/lint: explain and extend the tests for box comments

These tests are in preparation of removing the magic number 4 from
search_stmt_comment.
 1.9 29-Oct-2021  rillig indent: use prev/curr/next to refer to the current token

The word 'last' just didn't match with 'next'.

No functional change.
 1.8 26-Oct-2021  rillig indent: clean up process_comment

There is no undefined behavior since the compared characters are always
from the basic execution character set. All other cases are covered by
the condition above for now_len.

Fix debug logging for non-ASCII characters, previously a character was
output as \xffffffc3.
 1.7 24-Oct-2021  rillig tests/indent: document how empty lines in box comments are handled
 1.6 24-Oct-2021  rillig tests/indent: test form feed in comments
 1.5 19-Oct-2021  rillig tests/indent: move tests for indent comments

The special INDENT ON and INDENT OFF comments look like ordinary
comments but are handled in inbuf_read_line. Implementing this feature
in the input function has several unintended side effects regarding
indentation of these comments, as demonstrated by the tests.
 1.4 19-Oct-2021  rillig indent: if a file ends with indent off, don't add space-newline
 1.3 19-Oct-2021  rillig tests/indent: remove main code from test for token_comment

I had indented to use that code for completing the list of missing tests
but somehow forgot to remove it.
 1.2 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.1 18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 31-Oct-2021  rillig tests/indent: test formatting of 'CPU_INFO_FOREACH(cii, ci)'
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.6 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 07-Nov-2021  rillig indent: demonstrate disappearing form feed
 1.2 07-Nov-2021  rillig tests/indent: fix test for form feed

Previously, I had written a vertical tab instead of a form feed, which
had a different effect.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.8 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.7 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.6 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.5 20-Nov-2021  rillig tests/indent: normalize empty lines in tests
 1.4 20-Nov-2021  rillig indent: clean up lint annotation and tests
 1.3 07-Nov-2021  rillig tests/indent: document quick-and-dirty approach of lex_number
 1.2 07-Nov-2021  rillig tests/indent: test identifiers containing '$'
 1.1 18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.3 23-Apr-2022  rillig tests/indent: migrate a few token tests to psym tests
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.3 23-Apr-2022  rillig tests/indent: migrate a few token tests to psym tests
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.3 23-Apr-2022  rillig tests/indent: migrate a few token tests to psym tests
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.6 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.3 07-Nov-2021  rillig tests/indent: test cast, line counting, comment in struct
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.3 23-Apr-2022  rillig tests/indent: migrate tests for the tokens '{' and '.'
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.11 24-Apr-2022  rillig tests/indent: migrate tests for parentheses, brackets, braces
 1.10 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.9 29-Oct-2021  rillig indent: use prev/curr/next to refer to the current token

The word 'last' just didn't match with 'next'.

No functional change.
 1.8 29-Oct-2021  rillig indent: spell 'parentheses' properly in messages and comments
 1.7 25-Oct-2021  rillig tests/indent: clean up test for lbrace

After splitting token_type into separate types, want_blank_before_lparen
cannot depend on a parser_symbol anymore.
 1.6 24-Oct-2021  rillig indent: rename form_feed to tt_lex_form_feed

No functional change.
 1.5 24-Oct-2021  rillig indent: split kw_do_or_else into separate constants

It was unnecessarily confusing to have the token types keyword_do_else,
keyword_do and keyword_else at the same time, without any hint in what
they differed.

Some of the token types seem to be used by the lexer while others are
used in the parse stack. Maybe all token types can be partitioned into
these groups, which would suggest to use two different types for them.
And if not, it's still clearer to have this distinction in the names of
the constants.

No functional change.
 1.4 24-Oct-2021  rillig indent: clean up format of warnings and errors

Previously, warnings and errors had the form of C block comments. Before
NetBSD io.c 1.20 from 2019-10-19, this format made sense because the
diagnostics could end up in the same output stream as the formatted
output.

Since NetBSD io.c 1.20 from 2019-10-19, all diagnostics are redirected
to stderr. This change was not mentioned in the commit message back
then, it makes sense nevertheless. Since stdout and stderr now are
properly separated, there is no need anymore to keep the weird format
for warnings and errors. Switch to the standard 'error: file:line'
format.

Move the function 'diag' to indent.c to have access to the name of the
current input file.
 1.3 24-Oct-2021  rillig tests/indent: document actually reachable token combinations with '('
 1.2 24-Oct-2021  rillig tests/indent: test want_blank_before_lparen
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 23-Apr-2022  rillig tests/indent: migrate tests for the tokens '{' and '.'
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 26-Nov-2021  rillig indent: remove code that fixes malformed preprocessor directives
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 28-Nov-2021  rillig tests/indent: migrate token_question to lsym_question and extend it
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.3 24-Apr-2022  rillig tests/indent: migrate tests for parentheses, brackets, braces
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 24-Oct-2021  rillig indent: fix indentation of ad-hoc tagged variables

Seen among others in usr.bin/indent/lexi.c, variable 'keywords'.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.6 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.5 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.4 24-Apr-2022  rillig tests/indent: normalize amount of empty lines between test cases
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.4 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.3 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.2 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 04-Nov-2021  rillig indent: fix joining of adjacent unary '+' operators
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.5 24-Apr-2022  rillig tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.
 1.4 24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.3 22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.2 20-Nov-2021  rillig tests/indent: clean up and extend tests
 1.1 18-Oct-2021  rillig tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file types_from_file.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file types_from_file.0.list was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file types_from_file.0.pro was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 23-Oct-2021  rillig tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file types_from_file.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file wchar.0 was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.2 22-Oct-2021  rillig tests/indent: migrate tests for parentheses, struct, #if, wide char
 1.1 04-Apr-2019  kamil branches: 1.1.2;
Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 04-Apr-2019  christos file wchar.0.stdout was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.1 06-Jun-2012  martin branches: 1.1.4;
Add a basic test for infocmp - this would have cought todays terminfo
lossage (PR lib/46553).
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 06-Jun-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-10-30 19:00:09 +0000
 1.1 06-Jun-2012  martin branches: 1.1.4;
Add a basic test for infocmp - this would have cought todays terminfo
lossage (PR lib/46553).
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 06-Jun-2012  yamt file t_terminfo.sh was added on branch yamt-pagecache on 2012-10-30 19:00:09 +0000
 1.2 20-Mar-2012  jruoho branches: 1.2.2;
Add missing text file. Pointed out by P. Welche.
 1.1 20-Mar-2012  jruoho Add regression tests for PR bin/12424, PR bin/12316, and PR bin/14253,
all fixed long time ago.
 1.2.2.2 17-Apr-2012  yamt sync with head
 1.2.2.1 20-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 20-Mar-2012  jruoho branches: 1.1.2;
Add regression tests for PR bin/12424, PR bin/12316, and PR bin/14253,
all fixed long time ago.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 20-Mar-2012  yamt file d_basic.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 20-Mar-2012  jruoho branches: 1.1.2;
Add regression tests for PR bin/12424, PR bin/12316, and PR bin/14253,
all fixed long time ago.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 20-Mar-2012  yamt file t_jot.sh was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.4 15-Nov-2014  uebayasi Merge tests.
 1.3 14-Nov-2014  uebayasi Test orphan ELF section placement.
 1.2 14-Nov-2014  uebayasi Test __start_xxx/__stop_xxx symbol generation.
 1.1 14-Nov-2014  uebayasi Minimal linker script test.
 1.3 15-Nov-2014  uebayasi Merge tests.
 1.2 14-Nov-2014  uebayasi Tweak previous.
 1.1 14-Nov-2014  uebayasi Test orphan ELF section placement.
 1.7 16-Nov-2014  uebayasi Minor tweaks.
 1.6 16-Nov-2014  uebayasi Test SORT() command.
 1.5 15-Nov-2014  uebayasi Tweaks.
 1.4 15-Nov-2014  uebayasi Test object reordering by script.
 1.3 15-Nov-2014  uebayasi Test object ordering.
 1.2 15-Nov-2014  uebayasi Tweak.
 1.1 14-Nov-2014  uebayasi Minimal linker script test.
 1.5 05-Jun-2022  skrll Match explicit section names and not .{text,data}.* for example.

This test now passes on hppa.
 1.4 17-Feb-2015  martin Make the dummy data that we expect to go into .data section bigger,
otherwise on e.g. alpha it goes into the "small objects data" .sdata
section, which confuses the matching done in this test.
 1.3 15-Nov-2014  uebayasi Merge tests.
 1.2 14-Nov-2014  uebayasi Fix thinko in previous.
 1.1 14-Nov-2014  uebayasi Test __start_xxx/__stop_xxx symbol generation.
 1.1 03-Jul-2020  jruoho Add a check for PR bin/54692.
 1.1 03-Jul-2020  jruoho Add a check for PR bin/54692.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_ff_after_dnl.m4.uue was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_ff_after_dnl.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_m4wrap-P.m4 was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_m4wrap-P.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_m4wrap.m4 was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_m4wrap.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_m4.sh was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.4 19-Jan-2023  rillig tests/make: rename files that are not test cases
 1.3 17-Apr-2021  rillig tests/make: simplify selection of the files to be copied

No functional change.
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_comment.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_comment.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_cond1.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_cond1.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_dotwait.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.3 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.2 24-Jul-2013  christos adjust for make(1) printing the nesting level.
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.4;
Deprecate tests/util.
 1.1.4.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.3 22-May-2014  yamt 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")
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_dotwait.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_export.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_export.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_export_all.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_export_all.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_moderrs.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_moderrs.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modmatch.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modmatch.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modmisc.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modmisc.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modorder.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modorder.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modts.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modts.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modword.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_modword.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.4 23-Aug-2014  christos not needed anymore.
 1.3 23-Aug-2014  christos PR/49085: Jarmo Jaakkola: fix several parsing errors

Don't exit from var.c:Var_Parse() before possible modifiers are handled
on D and F modified versions of local variables. Properly expand $(?D)
and $(?F) too.

Make line continuations in rule's commands POSIX compliant.

Fix the syntax error caused by lib(member) as the last target before
a dependency operator.

Document the line continuation change in the manual page. Also talk
more about the POSIX style local variables and their modifiers.

Add tests covering the fixed problems into d_posix.mk. The test is
a known failure at the moment because of PR 49086 and PR 49092.

[XXX: unconverted tests]
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_posix.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.4 23-Aug-2014  christos not needed anymore.
 1.3 23-Aug-2014  christos PR/49085: Jarmo Jaakkola: fix several parsing errors

Don't exit from var.c:Var_Parse() before possible modifiers are handled
on D and F modified versions of local variables. Properly expand $(?D)
and $(?F) too.

Make line continuations in rule's commands POSIX compliant.

Fix the syntax error caused by lib(member) as the last target before
a dependency operator.

Document the line continuation change in the manual page. Also talk
more about the POSIX style local variables and their modifiers.

Add tests covering the fixed problems into d_posix.mk. The test is
a known failure at the moment because of PR 49086 and PR 49092.

[XXX: unconverted tests]
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_posix.out was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_qequals.mk was added on branch yamt-pagecache on 2012-04-17 00:09:20 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_qequals.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_ternary.mk was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_ternary.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_unmatchedvarparen.mk was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_unmatchedvarparen.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_varcmd.mk was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_varcmd.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.17 25-Feb-2023  sjg t_make skip varname-dot-make-meta-ignore_*

The meta-ignore tests will likely not work in this environment
so skip them.
 1.16 19-Jan-2023  rillig tests/make: rename files that are not test cases
 1.15 17-Apr-2021  rillig tests/make: remove ATF descr

The description of the tests is not going to be added anytime soon, as
that would either create redundancy or additional run-time cost.
Parsing and evaluating unit-tests/Makefile is already O(n^2) with regard
to the number of tests, and there are quite a few tests. Therefore don't
add any overhead for now.
 1.14 17-Apr-2021  rillig tests/make: indent consistently
 1.13 06-Feb-2021  martin Run all make tests as unprileged user - makes checking permission issues
a lot easier.
 1.12 20-Oct-2020  rillig make(1): split test suffixes.mk into simpler, isolated tests

The code in suff.c is already hard to understand, and so were the tests
in suffixes.mk since several independent topics were merged into a
single test.

Splitting this test into a separate test per issue allows to document
the expected and actual behavior in more detail. That's complicated
enough already.

PR bin/49086
 1.11 10-Sep-2020  kre Whitespace. NFC.
 1.10 10-Sep-2020  kre Replace use of tr to translate '-' in test names into '_' to satisfy ATF
requirements (correct sh variable/function name syntax). Use a sh
loop instead, and save one fork() one vfork() and one exec of tr for
each test case (many of which don't need anything done to them at all).

This might partially mitigate PR misc/55595
 1.9 15-Aug-2020  rillig make(1): mark tests impsrc and phony-end as no longer failing

These tests have been adjusted to demonstrate the current behavior,
mentioning the expected behavior in comments.
 1.8 08-Jun-2020  rillig usr.bin/make: fix test failure

The two files include-sub.mk and include-subsub.mk were never intended to
be test cases on their own. They belong to include-main.mk.

Fixes PR bin/55360.
 1.7 27-Jan-2015  martin Mark the failing tests as expected failure and point to PR toolchain/49085.
 1.6 23-Aug-2014  apb Remove commented-out debug code that was accidentally committed yesterday.
 1.5 23-Aug-2014  christos undo previous bogus merge of PR49085
 1.4 23-Aug-2014  christos PR/46096: Jarmo Jaakkola: fix many problems with dependencies (PR 49086)

Quite extensive rewrite of the Suff module. Some ripple effects into
Parse and Targ modules too.

Dependency searches in general were made to honor explicit rules so
implicit and explicit sources are no longer applied on targets that
do not invoke a transformation rule.

Archive member dependency search was rewritten. Explicit rules now
work properly and $(.TARGET) is set correctly. POSIX semantics for
lib(member.o) and .s1.a rules are supported.

.SUFFIXES list maintenance was rewritten so that scanning of existing
rules works when suffixes are added and that clearing the suffix list
removes single suffix rules too. Transformation rule nodes are now
mixed with regular nodes so they are available as regular targets too
if needed (especially after the known suffixes are cleared).

The .NULL target was documented in the manual page, especially to
warn against using it when a single suffix rule would work.
A deprecation warning was also added to the manual and make also
warns the user if it encounters .NULL.

Search for suffix rules no longer allows the explicit dependencies
to override the selected transformation rule. A check is made in
the search that the transformation that would be tried does not
already exist in the chain. This prevents getting stuck in an infinite
loop under specific circumstances. Local variables are now set
before node's children are expanded so dynamic sources work in
multi-stage transformations. Make_HandleUse() no longer expands
the added children for transformation nodes, preventing triple
expansion and allowing the Suff module to properly postpone their
expansion until proper values are set for the local variables.

Directory prefix is no longer removed from $(.PREFIX) if the target
is found via directory search.

The last rule defined is now used instead of the first one (POSIX
requirement) in case a rule is defined multiple times. Everything
defined in the first instance is undone, but things added "globally"
are honored. To implement this, each node tracks attribute bits
which have been set by special targets (global) instead of special
sources (local). They also track dependencies that were added by
a rule with commands (local) instead of rule with no commands (global).

New attribute, OP_FROM_SYS_MK is introduced. It is set on all targets
found in system makefiles so that they are not eligible to become
the main target. We cannot just set OP_NOTMAIN because it is one of
the attributes inherited from transformation and .USE rules and would
make any eligible target that uses a built-in inference rule ineligible.

The $(.IMPSRC) local variable now works like in gmake: it is set to
the first prerequisite for explicit rules. For implicit rules it
is still the implied source.

The manual page is improved regarding the fixed features. Test cases
for the fixed problems are added.

Other improvements in the Suff module include:
- better debug messages for transformation rule search (length of
the chain is now visualized by indentation)
- Suff structures are created, destroyed and moved around by a set
of maintenance functions so their reference counts are easier
to track (this also gets rid of a lot of code duplication)
- some unreasonably long functions were split into smaller ones
- many local variables had their names changed to describe their
purpose instead of their type
 1.3 23-Aug-2014  christos PR/49085: Jarmo Jaakkola: fix several parsing errors

Don't exit from var.c:Var_Parse() before possible modifiers are handled
on D and F modified versions of local variables. Properly expand $(?D)
and $(?F) too.

Make line continuations in rule's commands POSIX compliant.

Fix the syntax error caused by lib(member) as the last target before
a dependency operator.

Document the line continuation change in the manual page. Also talk
more about the POSIX style local variables and their modifiers.

Add tests covering the fixed problems into d_posix.mk. The test is
a known failure at the moment because of PR 49086 and PR 49092.

[XXX: unconverted tests]
 1.2 22-Aug-2014  apb Test make(1) by running the maintained tests, not unmaintained
copies of them.

* Remove all old tests from src/tests/usr.bin/make/d_*. These tests
were unmaintained old copies of the actual tests which are maintained
under src/usr.bin/make/unit-tests. One exception is the test in
d_unmatchedvarparen.mk, which was new, but has nw been added to
src/usr.bin/make/unit-tests/varmisc.mk.
* In src/tests/usr.bin/make/Makefile, copy all
the tests from src/usr.bin/make/unit-tests to
${DESTDIR}/usr/tests/usr.bin/make/unit-tests.
* In src/tests/usr.bin/make/t_make.sh, run the tests installed above,
instead of the old tests.
* In etc/mtree/NetBSD.dist.tests, create the
usr/tests/usr.bin/make/unit-tests diectory.
* Update the set lists for all the above.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_make.sh was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 02-Jan-2017  christos branches: 1.1.2;
mixerctl tests from Charlotte Koch
 1.1.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.1 02-Jan-2017  pgoyette file Makefile was added on branch pgoyette-localcount on 2017-01-07 08:56:57 +0000
 1.12 10-Aug-2022  charlotte Add a TNF copyright statement in t_mixerctl.sh
 1.11 18-Dec-2021  kre Compensate for changes made in mixerctl.c rev 1.29
Usage msg now appears on stderr, and causes exit status to be 1
 1.10 25-Jul-2017  kre Do the previous test a better way - for a file, test is generally
adequate, but for a device, we really need to actually try opening
it to determine that it is possible - so do the test that way, then
if the open succeeds once, assume it will the second time (which then
holds it open.)
 1.9 25-Jul-2017  kre Correct oversight in previous ... redirecting into a compound statement
causes the shell to exit if the redirect fails (posix says "may exit"
and /bin/sh does - maybe should give that more thought) - which will
happen if /dev/pad0 does not exist, causing a very messy test abort
(the shell running the test is not supposed to just go away). So
check tha the device exista and is readable before attempting to open it.

Problem brought to my attention by nat@ - thanks...
 1.8 18-Jul-2017  kre NFC: Typo in a comment corrected.
 1.7 18-Jul-2017  kre Make sure that the open of /dev/pad0 has succeeded (or at the very
least been attempted) before attempting to open /dev/mixer to determine
if the system being tested has audio or not. Leaving this for the background
cat command to do causes a race between that command and the parent sh.
Move this code to a helper function to avoid duplicating it.

Also avoid attempting to kill the background cat if it was never created.
The kill is likely unnecessary anyway, ATF seems to clean up processes
like that one without assistance. Which is a good thing, as the kill
does not happen if the test is skipped, or fails.
 1.6 03-Jul-2017  nat As pad devices are now created on demand - pad has to be open for a
corresponding mixer to be available.
 1.5 20-Apr-2017  kre If we are using the pad audio device, there must be a process with
the corresponding pad device open, or we get EIO from audio accesses

Explained and fix provided by Nathanial Sloss <nat@n.o>

Note: if we are testing and using real audio hardware, the open
of /dev/pad0 is irrelevant (but harmless, so we don't attempt to
check) and what's more it doesn't matter if it succeeds or fails.

If we're testing under qemu (or any other situation where the only
audio "hardware" is pad) then the open will work, and there should be
no more EIO.

If there is no audio hardware of any kind on the system being tested,
the attempt top open /dev/mixer should fail, and the test will be
skipped.
 1.4 23-Feb-2017  kre Drop the test for QEMU and instead skip relevant tests when /dev/mixer
can't be opened (which more accurately reflects when mixerctl is going
to fail...)

Based upon an idea from Andreas Gustafsson (gson@) - except that using
/dev/audio0 for this purpose doesn't work, if the only audio device
configured is pad0 an open of audio fails with EIO (???)

While here, perpare for the updated mixerctl coming soon to a repository
near you...
Use correct usage in the test of a bogus -d arg (otherwise the
new mixerctl will complain about usage, and never even
attempt to open the bogus device)
Don't require /dev/mixer for the noargs -> generate usage msg
test ... this will now generate a failing test with the
old mixerctl if there is no working /dev/mixer, but
that mixerctl won't be around much longer.
 1.3 23-Feb-2017  kre Limit previous to the i386 qemu kernels, the tests work on amd64 and sparc
(which have some audio configured.)
 1.2 23-Feb-2017  kre Skip most of the mixerctl tests when running under QEMU (assumed to be for ATF)
as the kernel that runs them has no audio (and no mixers) configured.

The usage message test might be returned some day if /usr/bin/mixerctl
gets modified so it doesn't attempt to open the device (and error out)
in cases where the device isn't actually going to be used (and -d wasn't
given to set the device name explicitly).
 1.1 02-Jan-2017  christos branches: 1.1.2; 1.1.4;
mixerctl tests from Charlotte Koch
 1.1.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.1.2.4 26-Apr-2017  pgoyette Sync with HEAD
 1.1.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.1.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.1 02-Jan-2017  pgoyette file t_mixerctl.sh was added on branch pgoyette-localcount on 2017-01-07 08:56:57 +0000
 1.3 20-Aug-2021  rillig mkdep: avoid memory allocation in findcc

This change takes the idea of handling strings as pairs in the form
(start, len) by Robert Elz from
https://mail-index.netbsd.org/source-changes-d/2021/08/20/msg013427.html
and expands it by avoiding one more memory allocation, for iterating the
PATH environment variable.

No functional change.
 1.2 11-Aug-2021  rillig tests/mkdep: test findcc

This function is used by both mkdep and lint.
 1.1 30-May-2011  njoly Add testcase for PR bin/45004, to exercize suffixes lists for
mkdep(1).
 1.1 11-Aug-2021  rillig tests/mkdep: test findcc

This function is used by both mkdep and lint.
 1.3 20-Aug-2021  rillig mkdep: avoid memory allocation in findcc

This change takes the idea of handling strings as pairs in the form
(start, len) by Robert Elz from
https://mail-index.netbsd.org/source-changes-d/2021/08/20/msg013427.html
and expands it by avoiding one more memory allocation, for iterating the
PATH environment variable.

No functional change.
 1.2 20-Aug-2021  rillig mkdep: make argument of findcc const

Previously, findcc modified its argument string, even though it had been
declared as 'const char *'. This triggered a lint warning that "strchr
effectively discards 'const char *' from argument", in fact, this code
caused the lint check to be implemented in the first place.

The first attempt at fixing it by removing the 'const' from the
parameter type was a bad idea since it made the API of that function
more complicated.

Revert back to making the parameter a 'const char *' and duplicate that
string internally as necessary. Add a few more tests for absolute
pathnames since these had been missing before. There are no tests yet
for snprintf with too long strings, but the current change does not
modify that part of the code.
 1.1 11-Aug-2021  rillig tests/mkdep: test findcc

This function is used by both mkdep and lint.
 1.4 26-Aug-2012  jmmv Add a new "-P prefix" option to mkdep(1).

This option prepends the string given in prefix to every target
filename. This is useful for programs that have source files in
multiple subdirectories and a single Makefile that references all of
them explicitly (without using the VPATH functionality because there
can be files with the same name in each subdirectory).
 1.3 14-Jun-2011  njoly branches: 1.3.2;
mkdep(1) needs cc(1). Make testcase check for them.
 1.2 31-May-2011  njoly branches: 1.2.2;
Adjust testcase for recent changes.
- suffixes output order is now reversed.
- remove expected failure for empty list.
 1.1 30-May-2011  njoly Add testcase for PR bin/45004, to exercize suffixes lists for
mkdep(1).
 1.2.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.1 25-Jan-2024  riastradh mtree(8): Test the installed sets.

Except etc and xetc, which likely won't match for reasons that aren't
great, like etc including empty log files which in an installed
system have probably changed.

This test will probably fail, but we should make sure it doesn't!

PR misc/57877
 1.9 10-May-2024  riastradh tests/usr.bin/mtree/t_sets: Add base32, base64, debug32, debug64.
 1.8 07-May-2024  martin Add manhtml set
 1.7 06-May-2024  riastradh tests/usr.bin/mtree/t_sets.sh: atf_fail, not atf_tc_fail
 1.6 04-May-2024  riastradh tests/usr.bin/mtree: Fail gracefully with unknown sets.

Rather than `bogus test program', make a test fail.

PR misc/57877
 1.5 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.4 30-Jan-2024  martin Skip the dtb set if the /boot partition is not mounted.
 1.3 28-Jan-2024  riastradh tests/usr.bin/mtree: Fixed the set lists, no more xfail.

PR misc/57877
 1.2 26-Jan-2024  riastradh tests/usr.bin/mtree: xfail PR 57877; omit needless debug print.
 1.1 25-Jan-2024  riastradh mtree(8): Test the installed sets.

Except etc and xetc, which likely won't match for reasons that aren't
great, like etc including empty log files which in an installed
system have probably changed.

This test will probably fail, but we should make sure it doesn't!

PR misc/57877
 1.2 31-May-2018  mrg make 'clean' and/or 'cleandir' actually clean all the things.
 1.1 22-Jul-2012  joerg branches: 1.1.4; 1.1.32;
Add basic regression test for nbperf(1)
 1.1.32.1 25-Jun-2018  pgoyette Sync with HEAD
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 22-Jul-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-10-30 19:00:09 +0000
 1.2 25-Sep-2012  joerg branches: 1.2.2; 1.2.4;
Simplify the BDZ compression function, making it smaller at the same
time. Fixes a bug where non-minimal hash functions could be created.
Add regression tests for BDZ, including the map output functionality.
 1.1 22-Jul-2012  joerg branches: 1.1.2;
Add basic regression test for nbperf(1)
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 25-Sep-2012  yamt file h_nbperf.sh was added on branch yamt-pagecache on 2012-10-30 19:00:10 +0000
 1.2.2.2 17-Oct-2012  riz Pull up following revision(s) (requested by joerg in ticket #574):
tests/usr.bin/nbperf/hash_driver.c: revision 1.2
tests/usr.bin/nbperf/h_nbperf.sh: revision 1.2
tests/usr.bin/nbperf/t_nbperf.sh: revision 1.2
usr.bin/nbperf/nbperf.1: revision 1.5
usr.bin/nbperf/nbperf-bdz.c: revision 1.5
Simplify the BDZ compression function, making it smaller at the same
time. Fixes a bug where non-minimal hash functions could be created.
Add regression tests for BDZ, including the map output functionality.
 1.2.2.1 25-Sep-2012  riz file h_nbperf.sh was added on branch netbsd-6 on 2012-10-17 21:37:11 +0000
 1.3 06-Feb-2014  joerg Pass the correct buffer size.
 1.2 25-Sep-2012  joerg branches: 1.2.2; 1.2.4;
Simplify the BDZ compression function, making it smaller at the same
time. Fixes a bug where non-minimal hash functions could be created.
Add regression tests for BDZ, including the map output functionality.
 1.1 22-Jul-2012  joerg branches: 1.1.2;
Add basic regression test for nbperf(1)
 1.1.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.3 22-May-2014  yamt 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")
 1.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 25-Sep-2012  yamt file hash_driver.c was added on branch yamt-pagecache on 2012-10-30 19:00:10 +0000
 1.2.2.2 17-Oct-2012  riz Pull up following revision(s) (requested by joerg in ticket #574):
tests/usr.bin/nbperf/hash_driver.c: revision 1.2
tests/usr.bin/nbperf/h_nbperf.sh: revision 1.2
tests/usr.bin/nbperf/t_nbperf.sh: revision 1.2
usr.bin/nbperf/nbperf.1: revision 1.5
usr.bin/nbperf/nbperf-bdz.c: revision 1.5
Simplify the BDZ compression function, making it smaller at the same
time. Fixes a bug where non-minimal hash functions could be created.
Add regression tests for BDZ, including the map output functionality.
 1.2.2.1 25-Sep-2012  riz file hash_driver.c was added on branch netbsd-6 on 2012-10-17 21:37:11 +0000
 1.5 14-Feb-2021  joerg Adjust test cases to hit the fudge case after the changes in nbperf
itself.
 1.4 07-Jan-2021  joerg Optimize nbperf

- add fudge mode which gives a slightly slower hash function, but works
almost always in the first iteration by avoiding degenerate edges
- avoid keeping incidence lists around reducing the memory foot print by
30%
- split edge processing from hashing as in the non-fudge case it is a
reasonable costly part that often gets thrown away
- merge graph2 and graph3 routines now that they are mostly the same
 1.3 30-Apr-2014  joerg Annotate dependencies.
 1.2 25-Sep-2012  joerg branches: 1.2.2; 1.2.4; 1.2.10;
Simplify the BDZ compression function, making it smaller at the same
time. Fixes a bug where non-minimal hash functions could be created.
Add regression tests for BDZ, including the map output functionality.
 1.1 22-Jul-2012  joerg branches: 1.1.2;
Add basic regression test for nbperf(1)
 1.1.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.10.1 10-Aug-2014  tls Rebase.
 1.2.4.3 22-May-2014  yamt 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")
 1.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 25-Sep-2012  yamt file t_nbperf.sh was added on branch yamt-pagecache on 2012-10-30 19:00:10 +0000
 1.2.2.2 17-Oct-2012  riz Pull up following revision(s) (requested by joerg in ticket #574):
tests/usr.bin/nbperf/hash_driver.c: revision 1.2
tests/usr.bin/nbperf/h_nbperf.sh: revision 1.2
tests/usr.bin/nbperf/t_nbperf.sh: revision 1.2
usr.bin/nbperf/nbperf.1: revision 1.5
usr.bin/nbperf/nbperf-bdz.c: revision 1.5
Simplify the BDZ compression function, making it smaller at the same
time. Fixes a bug where non-minimal hash functions could be created.
Add regression tests for BDZ, including the map output functionality.
 1.2.2.1 25-Sep-2012  riz file t_nbperf.sh was added on branch netbsd-6 on 2012-10-17 21:37:11 +0000
 1.2 02-Dec-2012  agc Remove the Atffile, which should not have been added in the first place.

With thanks to Herbert J. Skuhra and Paul Goyette
 1.1 20-Nov-2012  agc Add tests for netpgpverify.
 1.1 20-Nov-2012  agc branches: 1.1.2; 1.1.6;
Add tests for netpgpverify.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file Makefile was added on branch tls-maxphys on 2013-02-25 00:30:25 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file Makefile was added on branch yamt-pagecache on 2013-01-16 05:34:01 +0000
 1.3 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.2 01-Jun-2016  agc remove some unused test cases
 1.1 01-Jun-2016  agc Use human2atf to generate a t_netpgpverify.sh script which is half the
size of the previous one (using on-the-fly gzip compression), and includes
more cases (including a gpg-signed file for cross-testing purposes).

Add the appropriate Testspec file.
 1.5 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.4 28-Aug-2016  christos house-cleaning
 1.3 01-Jun-2016  agc Use human2atf to generate a t_netpgpverify.sh script which is half the
size of the previous one (using on-the-fly gzip compression), and includes
more cases (including a gpg-signed file for cross-testing purposes).

Add the appropriate Testspec file.
 1.2 23-Nov-2014  agc Since the netpgpverify rewrite to have no external pre-requisites, the
output format for signatures has changed cosmetically (mainly
whitespace changes). Re-format all the test cases so that the tests
now pass again with the new output format:

Tests root: /usr/tests/usr.bin/netpgpverify

t_netpgpverify (1/1): 2 test cases
netpgpverify_dsa: [0.261980s] Passed.
netpgpverify_rsa: [0.237469s] Passed.
[0.509571s]

Summary for 1 test programs:
2 passed test cases.
0 failed test cases.
0 expected failed test cases.
0 skipped test cases.
 1.1 20-Nov-2012  agc branches: 1.1.2; 1.1.6; 1.1.12;
Add tests for netpgpverify.
 1.1.12.1 25-Nov-2014  snj Pull up following revision(s) (requested by agc in ticket #258):
tests/usr.bin/netpgpverify/t_netpgpverify.sh: revision 1.2
Since the netpgpverify rewrite to have no external pre-requisites, the
output format for signatures has changed cosmetically (mainly
whitespace changes). Re-format all the test cases so that the tests
now pass again with the new output format:
Tests root: /usr/tests/usr.bin/netpgpverify
t_netpgpverify (1/1): 2 test cases
netpgpverify_dsa: [0.261980s] Passed.
netpgpverify_rsa: [0.237469s] Passed.
[0.509571s]
Summary for 1 test programs:
2 passed test cases.
0 failed test cases.
0 expected failed test cases.
0 skipped test cases.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file t_netpgpverify.sh was added on branch tls-maxphys on 2013-02-25 00:30:25 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file t_netpgpverify.sh was added on branch yamt-pagecache on 2013-01-16 05:34:02 +0000
 1.1 24-Jun-2020  jruoho Add a test case for bin/54620.
 1.4 11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.3 25-May-2021  cjep The long lines test is now expected to pass
 1.2 20-Feb-2021  nia branches: 1.2.2;
patch(1): add test cases for various backup file formats
 1.1 24-Jun-2020  jruoho Add a test case for bin/54620.
 1.2.2.1 31-May-2021  cjep sync with head
 1.1 21-Feb-2017  kre branches: 1.1.2; 1.1.4;
PR bin/50934

Add a test program for the bug described in this PR.
This is the first pkill/pgrep/prenice test (more would be good!)

This test has been confirmed to work once the bug described in the PR
has been fixed, so the test is not marked "expected to fail" even
though initially that is what should happen.

Note: the test cana also fail if the system running the tests happens
to be running processes with names that match the patterns searched for
by the test, other than the test program itself. This is expected to be
unlikely.
 1.1.4.2 21-Feb-2017  kre 79017
 1.1.4.1 21-Feb-2017  kre file Makefile was added on branch bouyer-socketcan on 2017-02-21 10:40:31 +0000
 1.1.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.2.1 21-Feb-2017  pgoyette file Makefile was added on branch pgoyette-localcount on 2017-03-20 06:58:02 +0000
 1.2 21-Feb-2017  kre branches: 1.2.2; 1.2.4;

Ugh... fix a last minute fix that went horribly wrong!
 1.1 21-Feb-2017  kre PR bin/50934

Add a test program for the bug described in this PR.
This is the first pkill/pgrep/prenice test (more would be good!)

This test has been confirmed to work once the bug described in the PR
has been fixed, so the test is not marked "expected to fail" even
though initially that is what should happen.

Note: the test cana also fail if the system running the tests happens
to be running processes with names that match the patterns searched for
by the test, other than the test program itself. This is expected to be
unlikely.
 1.2.4.2 21-Feb-2017  kre 1935552
 1.2.4.1 21-Feb-2017  kre file t_pgrep.sh was added on branch bouyer-socketcan on 2017-02-21 21:22:46 +0000
 1.2.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.2.2.1 21-Feb-2017  pgoyette file t_pgrep.sh was added on branch pgoyette-localcount on 2017-03-20 06:58:02 +0000
 1.2 03-May-2011  jruoho Fix build failure reported by pgoyette@.
 1.1 03-May-2011  jruoho Add a test for PR bin/41880.
 1.1 03-May-2011  jruoho Add a test for PR bin/41880.
 1.1 03-May-2011  jruoho Add a test for PR bin/41880.
 1.4 13-Mar-2012  jruoho PRs bin/41880 and bin/26453 were fixed, so remove xfails.
 1.3 11-May-2011  njoly branches: 1.3.4;
Remove shebang lines from test-script sources; avoids duplicate with
the build process which adds one too.
 1.2 03-May-2011  jruoho Fix same copy-paste error here. (Why atf(7) does not warn about these?)
 1.1 03-May-2011  jruoho Add a test for PR bin/41880.
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.1 05-Sep-2018  kre branches: 1.1.2; 1.1.4;
Add ATF tests for printf(1)

Two new test programs, one for the version of printf in /bin/sh
and one for the command /usr/bin/printf (t_builtin and t_command)

Each test program has 28 test cases (the same in each) of which
currently 27 pass, and 1 is skipped.

See the test scripts themselves for more information.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 05-Sep-2018  christos file Makefile was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 05-Sep-2018  pgoyette file Makefile was added on branch pgoyette-compat on 2018-09-06 06:56:49 +0000
 1.9 24-May-2022  andvar fix various typos in comment, documentation and log messages.
 1.8 19-May-2021  kre With the (very) recent changes to printf(1), a numeric conversion from data
of the form '+1 (two (or more) characters after the quote) will now generate
an error message, and cause printf(1) to exit(1) when it is done.

Adapt the test cases which use that data form to handle that.
 1.7 19-May-2021  kre Fix a truly embarrassing quoting screwup. There is an explanation as
to why this didn't cause any failures, but I won't go into it here.
This was detected by the about to be committed printf changes.

While here also correct a couple of minor comment layout issues.
 1.6 24-Apr-2020  kre branches: 1.6.2;

ATF runs shell script tests with "sh -e" (WHY???)

Compensate for that by adding an explicit test to a command so
-e will not kill the shell when the command (expectedly) fails.

Previously this was saved by /bin/sh disabling -e in command subs.
 1.5 12-Nov-2019  kre Add a missing ("quoting") '>' in an atf_fail error message string.
Since the tests don't (usually) fail no-one ever noticed the missing char.

That is, the "received this" and "expected this" strings were supposed
to appear in the output err message as "<<string>>" but one of those
closing '>' chars was missing.

No-one should ever notice this change in normal operation, as the tests
are not intended to fail.
 1.4 21-Jul-2019  kre Stop assuming that printf handles options in any way at all
(it doesn't - that is, shouldn't) which includes processing -- as an
"end of options". The first arg is (always) the format string.

Remove/fix tests that assumed the contrary.

Problem (with printf) pointed out on tech-userlevel by Thierry Laronde.
 1.3 14-Sep-2018  kre branches: 1.3.2;

Move the tests of character value args to floating conversions
out of the %e test and into the NetBSD specific tests, while POSIX
once (apparently) required (or seemed to require) support for that,
it no longer does (and character value args to float conversions do
not make much sense - char valuse are always integers).

When char conversions are supported, test that \' (or \" ) (that is,
no character following the quote) works as an arg (should result in zero,
as there's a \0 in the arg after the quote char).

Add some big/small number %g conversion tests.
 1.2 10-Sep-2018  kre Add a test where printf is run twice in the same shell, and the
first invocation uses \c in a %b arg - make sure that 2nd invocation
is not affected by that (it was until recently, for a very long time).
 1.1 05-Sep-2018  kre branches: 1.1.2;
Add ATF tests for printf(1)

Two new test programs, one for the version of printf in /bin/sh
and one for the command /usr/bin/printf (t_builtin and t_command)

Each test program has 28 test cases (the same in each) of which
currently 27 pass, and 1 is skipped.

See the test scripts themselves for more information.
 1.1.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 05-Sep-2018  pgoyette file printf.sh was added on branch pgoyette-compat on 2018-09-06 06:56:49 +0000
 1.3.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.2.2 10-Jun-2019  christos Sync with HEAD
 1.3.2.1 14-Sep-2018  christos file printf.sh was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.6.2.1 31-May-2021  cjep sync with head
 1.5 21-Jul-2019  kre Correct a typo. It is atf_require_prog not atf_require_pfog ...
 1.4 14-Sep-2018  kre branches: 1.4.2;

When the shell being tested for builtin printf supports "type -t"
use it to test if printf is built in, it is must more reliable that
guessing at the output format and message of "type" (without -t).
 1.3 10-Sep-2018  kre Add a test where printf is run twice in the same shell, and the
first invocation uses \c in a %b arg - make sure that 2nd invocation
is not affected by that (it was until recently, for a very long time).
 1.2 08-Sep-2018  kre Make sure we're in the standard locale when testing for printf
being built in to the shell, so we don't receive an unrecognisable
(to the script) message from the shell when we ask it.
 1.1 05-Sep-2018  kre branches: 1.1.2;
Add ATF tests for printf(1)

Two new test programs, one for the version of printf in /bin/sh
and one for the command /usr/bin/printf (t_builtin and t_command)

Each test program has 28 test cases (the same in each) of which
currently 27 pass, and 1 is skipped.

See the test scripts themselves for more information.
 1.1.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 05-Sep-2018  pgoyette file t_builtin.sh was added on branch pgoyette-compat on 2018-09-06 06:56:49 +0000
 1.4.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.2.2 10-Jun-2019  christos Sync with HEAD
 1.4.2.1 14-Sep-2018  christos file t_builtin.sh was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.1 05-Sep-2018  kre branches: 1.1.2; 1.1.4;
Add ATF tests for printf(1)

Two new test programs, one for the version of printf in /bin/sh
and one for the command /usr/bin/printf (t_builtin and t_command)

Each test program has 28 test cases (the same in each) of which
currently 27 pass, and 1 is skipped.

See the test scripts themselves for more information.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 05-Sep-2018  christos file t_command.sh was added on branch phil-wifi on 2019-06-10 22:10:12 +0000
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 05-Sep-2018  pgoyette file t_command.sh was added on branch pgoyette-compat on 2018-09-06 06:56:49 +0000
 1.1 05-Oct-2019  jhigh branches: 1.1.4;
adding full scheme comparison to libcrypt:crypt and pwhash tests
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 05-Oct-2019  martin file Makefile was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.2 27-Oct-2021  nia t_pwhash: Don't assume default cipher is SHA1. Add Argon2 tests.
 1.1 05-Oct-2019  jhigh branches: 1.1.4;
adding full scheme comparison to libcrypt:crypt and pwhash tests
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 05-Oct-2019  martin file t_pwhash.sh was added on branch phil-wifi on 2020-04-13 08:05:33 +0000
 1.1 21-Jul-2022  kre Add ATF tests for realpath(1)

Note that realpath can act differently for root than for other users
(where an ordinary user will see EACCESS root just barrels right through).

The tests adapt themselves, when run as root, less error cases can be
tested than when run as some other user.
 1.1 21-Jul-2022  kre Add ATF tests for realpath(1)

Note that realpath can act differently for root than for other users
(where an ordinary user will see EACCESS root just barrels right through).

The tests adapt themselves, when run as root, less error cases can be
tested than when run as some other user.
 1.1 03-Feb-2011  pooka branches: 1.1.2;
add tests for the -d functionality of rump_server(1)
 1.1.2.2 08-Feb-2011  bouyer Sync with HEAD
 1.1.2.1 03-Feb-2011  bouyer file Makefile was added on branch bouyer-quota2 on 2011-02-08 19:01:38 +0000
 1.5 19-Feb-2013  joerg Check for RUMP programs before using them.
 1.4 14-May-2011  jmmv branches: 1.4.4; 1.4.10;
Instead of doing 'atf_check ... sh -c foo', just do 'atf_check ... -x foo'.
 1.3 17-Feb-2011  pooka Test the -d type parameter of rump_server(1).
XXX: these tests only work with a dynamic userland, dunno how to
specify a "skip" clause for that
 1.2 04-Feb-2011  pooka branches: 1.2.2;
convert tests from oldstyle dd rif/rof to newstyle dd | rump.dd
 1.1 03-Feb-2011  pooka add tests for the -d functionality of rump_server(1)
 1.2.2.3 05-Mar-2011  bouyer Sync with HEAD
 1.2.2.2 08-Feb-2011  bouyer Sync with HEAD
 1.2.2.1 04-Feb-2011  bouyer file t_disk.sh was added on branch bouyer-quota2 on 2011-02-08 19:01:38 +0000
 1.4.10.1 25-Feb-2013  tls resync with head
 1.4.4.1 22-May-2014  yamt 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")
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_dot.in was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_flags_l.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_flags_s.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_flags_w.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_iflags_a1.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_iflags_a2.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_iflags_b1.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_iflags_b2.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_iflags_c1.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_iflags_c2.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_iflags_d1.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_iflags_d2.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_input1 was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_input2 was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_oneline.in was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_oneline_a.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_oneline_b.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_same.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_short.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_tabends.in was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_tabends_a.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_tabends_b.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_tabends_c.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_tabs.out was added on branch yamt-pagecache on 2012-04-17 00:09:21 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_tabs1.in was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_tabs2.in was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.2 28-Apr-2024  rillig tests: replace deprecated '-s eq:...' with '-s exit:...'
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_sdiff.sh was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.3 27-Mar-2012  jruoho branches: 1.3.2;
Fix typo.
 1.2 27-Mar-2012  jruoho Append a case for (fixed) PR bin/25899. From Min Sik Kim.
 1.1 18-Mar-2012  jruoho Add a test case for PR bin/28126. Does not fail with GNU sed.
 1.3.2.2 17-Apr-2012  yamt sync with head
 1.3.2.1 27-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.1 27-Mar-2012  jruoho branches: 1.1.2;
Append a case for (fixed) PR bin/25899. From Min Sik Kim.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 27-Mar-2012  yamt file d_c2048.in was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.15 03-Jun-2025  martin Fold subst_escapes test into escapes_in_re.
Add tests for escape sequence length limits.
 1.14 02-Jun-2025  bad add the missing terminating slashes in the sed commands

snarf'n'barfed the wrong command from the shell history last night.
serves me right.
 1.13 02-Jun-2025  gutteridge t_sed.sh: enable recently added test case

While here, move it near related, pre-existing tests. (We probably want
to rename it or collapse it into other tests, but that's TBD.)
 1.12 01-Jun-2025  bad add some test case for \[dox]number escapes to t_sed.sh

PR bin/59453
 1.11 06-May-2023  gutteridge branches: 1.11.2;
t_sed.sh: add a test case for relative addressing

At one time, this didn't always work correctly, per PR bin/49109. Test
case from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192108
 1.10 06-May-2023  gutteridge t_sed.sh: fix grammar, spelling, and formatting issues (NFC)
 1.9 07-Nov-2021  andvar fix various typos, mainly s/prefered/preferred/
 1.8 23-Feb-2021  christos Will be fixed with regex update
 1.7 05-Oct-2019  christos Add tests for escape sequences.
 1.6 05-Apr-2016  christos branches: 1.6.16;
Add test for PR/49872
 1.5 14-Mar-2013  jmmv Prevent the sed command in c2048 from getting stuck.

Provide some unused input to the sed command in the c2048 test to prevent
the test from getting stuck waiting for input from stdin that will never
arrive.

I don't know why I'm hitting this now (might be a difference between atf-run
and kyua), but this is a bug in the test.
 1.4 27-Mar-2012  jruoho branches: 1.4.2; 1.4.4;
Append a case for (fixed) PR bin/25899. From Min Sik Kim.
 1.3 19-Mar-2012  jruoho Add a case also for (fixed) PR bin/42261.
 1.2 18-Mar-2012  dholland Add some tests for selection of line ranges, based on a case that came
across the POSIX list a few days ago and some related phenomena.
 1.1 18-Mar-2012  jruoho Add a test case for PR bin/28126. Does not fail with GNU sed.
 1.4.4.1 23-Jun-2013  tls resync from head
 1.4.2.3 22-May-2014  yamt 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")
 1.4.2.2 17-Apr-2012  yamt sync with head
 1.4.2.1 27-Mar-2012  yamt file t_sed.sh was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.6.16.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 11-Mar-2011  pooka dumdidumdum, can't generate an incompatible test busfile and assume
that test will work. so replace the test data with something a bit
more realistic.
 1.2 10-Mar-2011  pooka remember to install test data files too. thanks, Paul.
 1.1 10-Mar-2011  pooka add tests for shmif_dumpbus(1)
 1.2 11-Mar-2011  pooka dumdidumdum, can't generate an incompatible test busfile and assume
that test will work. so replace the test data with something a bit
more realistic.
 1.1 10-Mar-2011  pooka add tests for shmif_dumpbus(1)
 1.3 09-Apr-2018  martin Use tcpdump -n to avoid reverse DNS lookup. There is no point in having
different results from running this test in a networked vs. a non-networked
environment.
Adjust golden output accordingly.
Fixes PR 53150.
 1.2 13-Mar-2011  pooka branches: 1.2.36; 1.2.42;
Use tcpdump -tt so that TZ doesn't affect the test result.
 1.1 11-Mar-2011  pooka dumdidumdum, can't generate an incompatible test busfile and assume
that test will work. so replace the test data with something a bit
more realistic.
 1.2.42.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.2.36.1 10-Apr-2018  bouyer Pull up following revision(s) (requested by martin in ticket #726):
tests/usr.bin/shmif_dumpbus/d_pcap.out.bz2.uue: revision 1.3
tests/usr.bin/shmif_dumpbus/t_basic.sh: revision 1.9
Use tcpdump -n to avoid reverse DNS lookup. There is no point in having
different results from running this test in a networked vs. a non-networked
environment.
Adjust golden output accordingly.
Fixes PR 53150.
 1.2 11-Mar-2011  pooka dumdidumdum, can't generate an incompatible test busfile and assume
that test will work. so replace the test data with something a bit
more realistic.
 1.1 10-Mar-2011  pooka add tests for shmif_dumpbus(1)
 1.1 11-Mar-2011  pooka dumdidumdum, can't generate an incompatible test busfile and assume
that test will work. so replace the test data with something a bit
more realistic.
 1.2 11-Mar-2011  pooka dumdidumdum, can't generate an incompatible test busfile and assume
that test will work. so replace the test data with something a bit
more realistic.
 1.1 10-Mar-2011  pooka add tests for shmif_dumpbus(1)
 1.10 02-Apr-2020  christos Add path.
 1.9 09-Apr-2018  martin branches: 1.9.2;
Use tcpdump -n to avoid reverse DNS lookup. There is no point in having
different results from running this test in a networked vs. a non-networked
environment.
Adjust golden output accordingly.
Fixes PR 53150.
 1.8 07-Apr-2013  christos branches: 1.8.20; 1.8.26;
don't run with -n if you expect protocol translation from number to name.
 1.7 18-Mar-2012  christos branches: 1.7.2;
say what happened.
 1.6 11-Apr-2011  martin branches: 1.6.4;
Should no longer fail - if it still does, be sure to have a proper
/var/chroot/tcpdump/etc/protocols file installed (i.e. by running
postinstall)
 1.5 14-Mar-2011  pooka xfail PR bin/44721
 1.4 13-Mar-2011  pooka Use tcpdump -tt so that TZ doesn't affect the test result.
 1.3 11-Mar-2011  pooka get the directories right ...
 1.2 11-Mar-2011  pooka dumdidumdum, can't generate an incompatible test busfile and assume
that test will work. so replace the test data with something a bit
more realistic.
 1.1 10-Mar-2011  pooka add tests for shmif_dumpbus(1)
 1.6.4.2 22-May-2014  yamt 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")
 1.6.4.1 17-Apr-2012  yamt sync with head
 1.7.2.1 23-Jun-2013  tls resync from head
 1.8.26.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.8.20.1 10-Apr-2018  bouyer Pull up following revision(s) (requested by martin in ticket #726):
tests/usr.bin/shmif_dumpbus/d_pcap.out.bz2.uue: revision 1.3
tests/usr.bin/shmif_dumpbus/t_basic.sh: revision 1.9
Use tcpdump -n to avoid reverse DNS lookup. There is no point in having
different results from running this test in a networked vs. a non-networked
environment.
Adjust golden output accordingly.
Fixes PR 53150.
 1.9.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 02-Sep-2024  ozaki-r branches: 1.1.2;
tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
 1.1.2.2 05-Sep-2024  martin Pull up following revision(s) (requested by ozaki-r in ticket #817):

tests/usr.bin/Makefile: revision 1.41 (patch)
distrib/sets/lists/base/mi: revision 1.1350 (patch)
usr.bin/shmif_pcapin/shmif_pcapin.1: revision 1.1
distrib/sets/lists/man/mi: revision 1.1787 (patch)
distrib/sets/lists/debug/mi: revision 1.447 (patch)
tests/usr.bin/shmif_pcapin/d_pcap.out.bz2.uue: revision 1.1
sys/rump/net/lib/libshmif/if_shmem.c: revision 1.88
etc/mtree/NetBSD.dist.tests: revision 1.207
sys/rump/net/lib/libshmif/shmifvar.h: revision 1.12
usr.bin/shmif_pcapin/shmif_pcapin.c: revision 1.1
usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/t_basic.sh: revision 1.1
usr.bin/Makefile: revision 1.240
distrib/sets/lists/tests/mi: revision 1.1335 (patch)
tests/usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/d_pcap.in.bz2.uue: revision 1.1

shmif: export LOCK_* definitions
They will be used by upcoming shmif_pcapin.

Add shmif_pcapin(1) utility program

It can send any frames that are stored in a pcap(3) file format to
shmif(4) Ethernet interface via the bus of it. If you want to write
some tests for networking with rump kernels and the tests need to send
frames that are difficult to generate by stock programs, shmif_pcapin
can be helpful.

The author of shmif_pcapin is k-goda@IIJ and the man page is written
by ozaki-r.

tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
distrib, etc: install shmif_pcapin and its tests
 1.1.2.1 02-Sep-2024  martin file Makefile was added on branch netbsd-10 on 2024-09-05 09:22:43 +0000
 1.1 02-Sep-2024  ozaki-r branches: 1.1.2;
tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
 1.1.2.2 05-Sep-2024  martin Pull up following revision(s) (requested by ozaki-r in ticket #817):

tests/usr.bin/Makefile: revision 1.41 (patch)
distrib/sets/lists/base/mi: revision 1.1350 (patch)
usr.bin/shmif_pcapin/shmif_pcapin.1: revision 1.1
distrib/sets/lists/man/mi: revision 1.1787 (patch)
distrib/sets/lists/debug/mi: revision 1.447 (patch)
tests/usr.bin/shmif_pcapin/d_pcap.out.bz2.uue: revision 1.1
sys/rump/net/lib/libshmif/if_shmem.c: revision 1.88
etc/mtree/NetBSD.dist.tests: revision 1.207
sys/rump/net/lib/libshmif/shmifvar.h: revision 1.12
usr.bin/shmif_pcapin/shmif_pcapin.c: revision 1.1
usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/t_basic.sh: revision 1.1
usr.bin/Makefile: revision 1.240
distrib/sets/lists/tests/mi: revision 1.1335 (patch)
tests/usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/d_pcap.in.bz2.uue: revision 1.1

shmif: export LOCK_* definitions
They will be used by upcoming shmif_pcapin.

Add shmif_pcapin(1) utility program

It can send any frames that are stored in a pcap(3) file format to
shmif(4) Ethernet interface via the bus of it. If you want to write
some tests for networking with rump kernels and the tests need to send
frames that are difficult to generate by stock programs, shmif_pcapin
can be helpful.

The author of shmif_pcapin is k-goda@IIJ and the man page is written
by ozaki-r.

tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
distrib, etc: install shmif_pcapin and its tests
 1.1.2.1 02-Sep-2024  martin file d_pcap.in.bz2.uue was added on branch netbsd-10 on 2024-09-05 09:22:43 +0000
 1.1 02-Sep-2024  ozaki-r branches: 1.1.2;
tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
 1.1.2.2 05-Sep-2024  martin Pull up following revision(s) (requested by ozaki-r in ticket #817):

tests/usr.bin/Makefile: revision 1.41 (patch)
distrib/sets/lists/base/mi: revision 1.1350 (patch)
usr.bin/shmif_pcapin/shmif_pcapin.1: revision 1.1
distrib/sets/lists/man/mi: revision 1.1787 (patch)
distrib/sets/lists/debug/mi: revision 1.447 (patch)
tests/usr.bin/shmif_pcapin/d_pcap.out.bz2.uue: revision 1.1
sys/rump/net/lib/libshmif/if_shmem.c: revision 1.88
etc/mtree/NetBSD.dist.tests: revision 1.207
sys/rump/net/lib/libshmif/shmifvar.h: revision 1.12
usr.bin/shmif_pcapin/shmif_pcapin.c: revision 1.1
usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/t_basic.sh: revision 1.1
usr.bin/Makefile: revision 1.240
distrib/sets/lists/tests/mi: revision 1.1335 (patch)
tests/usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/d_pcap.in.bz2.uue: revision 1.1

shmif: export LOCK_* definitions
They will be used by upcoming shmif_pcapin.

Add shmif_pcapin(1) utility program

It can send any frames that are stored in a pcap(3) file format to
shmif(4) Ethernet interface via the bus of it. If you want to write
some tests for networking with rump kernels and the tests need to send
frames that are difficult to generate by stock programs, shmif_pcapin
can be helpful.

The author of shmif_pcapin is k-goda@IIJ and the man page is written
by ozaki-r.

tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
distrib, etc: install shmif_pcapin and its tests
 1.1.2.1 02-Sep-2024  martin file d_pcap.out.bz2.uue was added on branch netbsd-10 on 2024-09-05 09:22:43 +0000
 1.1 02-Sep-2024  ozaki-r branches: 1.1.2;
tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
 1.1.2.2 05-Sep-2024  martin Pull up following revision(s) (requested by ozaki-r in ticket #817):

tests/usr.bin/Makefile: revision 1.41 (patch)
distrib/sets/lists/base/mi: revision 1.1350 (patch)
usr.bin/shmif_pcapin/shmif_pcapin.1: revision 1.1
distrib/sets/lists/man/mi: revision 1.1787 (patch)
distrib/sets/lists/debug/mi: revision 1.447 (patch)
tests/usr.bin/shmif_pcapin/d_pcap.out.bz2.uue: revision 1.1
sys/rump/net/lib/libshmif/if_shmem.c: revision 1.88
etc/mtree/NetBSD.dist.tests: revision 1.207
sys/rump/net/lib/libshmif/shmifvar.h: revision 1.12
usr.bin/shmif_pcapin/shmif_pcapin.c: revision 1.1
usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/t_basic.sh: revision 1.1
usr.bin/Makefile: revision 1.240
distrib/sets/lists/tests/mi: revision 1.1335 (patch)
tests/usr.bin/shmif_pcapin/Makefile: revision 1.1
tests/usr.bin/shmif_pcapin/d_pcap.in.bz2.uue: revision 1.1

shmif: export LOCK_* definitions
They will be used by upcoming shmif_pcapin.

Add shmif_pcapin(1) utility program

It can send any frames that are stored in a pcap(3) file format to
shmif(4) Ethernet interface via the bus of it. If you want to write
some tests for networking with rump kernels and the tests need to send
frames that are difficult to generate by stock programs, shmif_pcapin
can be helpful.

The author of shmif_pcapin is k-goda@IIJ and the man page is written
by ozaki-r.

tests: add a basic test for shmif_pcapin

The original author of the test is k-goda@IIJ. ozaki-r tweaked
the test to improve stability and added comments.
distrib, etc: install shmif_pcapin and its tests
 1.1.2.1 02-Sep-2024  martin file t_basic.sh was added on branch netbsd-10 on 2024-09-05 09:22:43 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_any_char_dflag_out.txt was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_any_char_fflag_out.txt was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_any_char_iflag_out.txt was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_any_char_in.txt was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_sort.sh was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.1 14-Mar-2024  rillig tests/stat: test the left-aligned and right-aligned 'S' format
 1.2 14-Mar-2024  rillig stat: don't allow numeric formatting flags on strings

Calling snprintf with "%+s" invokes undefined behavior.
 1.1 14-Mar-2024  rillig tests/stat: test the left-aligned and right-aligned 'S' format
 1.5 10-Jun-2024  kre More libarchive build fallout. With these changes, "build.sh build"
works for me (amd64). Testing "build.sh release" in parallel with this
commit.
 1.4 19-Jan-2020  christos branches: 1.4.4; 1.4.10;
Fix static linking (sun2)
 1.3 18-Jan-2020  christos not require .d files for the build.
 1.2 18-Jan-2020  ryoon Fix build. Three list.h files are required to generate .d files
 1.1 17-Jan-2020  christos new tests for libarchive
 1.4.10.1 01-Nov-2024  martin Pull up the following revisisions (as already intended yesterday),
requested by rin in ticket #991:

tests/usr.bin/cpio/Makefile rev 1.5 (with patch)
tests/usr.bin/tar/Makefile rev 1.5 (with patch)

More libarchive build fallout.
 1.4.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.4.1 19-Jan-2020  martin file Makefile was added on branch phil-wifi on 2020-04-13 08:05:34 +0000
 1.1 17-Jan-2020  christos branches: 1.1.4;
new tests for libarchive
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 17-Jan-2020  martin file t_tar.sh was added on branch phil-wifi on 2020-04-13 08:05:34 +0000
 1.1 18-May-2012  jruoho branches: 1.1.2;
Add a test case for PR kern/46463. From Richard Hansen.
 1.1.2.2 23-May-2012  yamt sync with head.
 1.1.2.1 18-May-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-05-23 10:08:22 +0000
 1.2 19-May-2012  jruoho branches: 1.2.2;
Make the test pass. It appears that this however does not reproduce the
PR kern/46463, even though the command is exactly the same.
 1.1 18-May-2012  jruoho Add a test case for PR kern/46463. From Richard Hansen.
 1.2.2.2 23-May-2012  yamt sync with head.
 1.2.2.1 19-May-2012  yamt file t_tmux.sh was added on branch yamt-pagecache on 2012-05-23 10:08:22 +0000
 1.1 10-Aug-2013  dholland branches: 1.1.4; 1.1.8;
Add tests for tr, including an xfail one for PR 48113.
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 10-Aug-2013  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:04:53 +0000
 1.1.4.2 22-May-2014  yamt 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")
 1.1.4.1 10-Aug-2013  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:42:24 +0000
 1.3 11-Aug-2013  dholland branches: 1.3.4; 1.3.8;
Add some cases pertaining to another bug I just fixed.
 1.2 11-Aug-2013  dholland Remove xfail for PR 48113.
 1.1 10-Aug-2013  dholland Add tests for tr, including an xfail one for PR 48113.
 1.3.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.8.1 11-Aug-2013  tls file t_basic.sh was added on branch tls-maxphys on 2014-08-20 00:04:53 +0000
 1.3.4.2 22-May-2014  yamt 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")
 1.3.4.1 11-Aug-2013  yamt file t_basic.sh was added on branch yamt-pagecache on 2014-05-22 11:42:24 +0000
 1.2 03-May-2011  jruoho Fix build failure reported by pgoyette@.
 1.1 03-May-2011  jruoho Verify that PR bin/42628 is no longer an issue.
 1.1 03-May-2011  jruoho Verify that PR bin/42628 is no longer an issue.
 1.1 03-May-2011  jruoho Verify that PR bin/42628 is no longer an issue.
 1.6 15-Oct-2012  njoly Add a small testcase for PR/47068.
 1.5 18-Mar-2012  jruoho branches: 1.5.2;
Move more PR references from comments to ATF's "descr".
 1.4 11-May-2011  njoly branches: 1.4.4;
Remove shebang lines from test-script sources; avoids duplicate with
the build process which adds one too.
 1.3 10-May-2011  njoly Add require.progs unifdef, to avoid failure if comp set is not
installed.
 1.2 03-May-2011  jruoho Fix copy-paste error.
 1.1 03-May-2011  jruoho Verify that PR bin/42628 is no longer an issue.
 1.4.4.2 30-Oct-2012  yamt sync with head
 1.4.4.1 17-Apr-2012  yamt sync with head
 1.5.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1 22-Oct-2016  abhinav branches: 1.1.2;
Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 22-Oct-2016  pgoyette file Makefile was added on branch pgoyette-localcount on 2016-11-04 14:49:24 +0000
 1.1 22-Oct-2016  abhinav branches: 1.1.2;
Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 22-Oct-2016  pgoyette file d_basic.in was added on branch pgoyette-localcount on 2016-11-04 14:49:24 +0000
 1.1 22-Oct-2016  abhinav branches: 1.1.2;
Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 22-Oct-2016  pgoyette file d_basic.out was added on branch pgoyette-localcount on 2016-11-04 14:49:24 +0000
 1.1 22-Oct-2016  abhinav branches: 1.1.2;
Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 22-Oct-2016  pgoyette file d_counts.out was added on branch pgoyette-localcount on 2016-11-04 14:49:24 +0000
 1.1 22-Oct-2016  abhinav branches: 1.1.2;
Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 22-Oct-2016  pgoyette file d_input.in was added on branch pgoyette-localcount on 2016-11-04 14:49:24 +0000
 1.1 22-Oct-2016  abhinav branches: 1.1.2;
Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 22-Oct-2016  pgoyette file d_show_duplicates.out was added on branch pgoyette-localcount on 2016-11-04 14:49:24 +0000
 1.1 22-Oct-2016  abhinav branches: 1.1.2;
Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 22-Oct-2016  pgoyette file d_show_uniques.out was added on branch pgoyette-localcount on 2016-11-04 14:49:24 +0000
 1.1 22-Oct-2016  abhinav branches: 1.1.2;
Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 22-Oct-2016  pgoyette file t_uniq.sh was added on branch pgoyette-localcount on 2016-11-04 14:49:24 +0000
 1.1 07-Jan-2014  gson branches: 1.1.4; 1.1.8;
Add some minimal tests of vmstat(1), to serve as regression tests
for PR bin/44518.
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 07-Jan-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:04:53 +0000
 1.1.4.2 22-May-2014  yamt 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")
 1.1.4.1 07-Jan-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:42:24 +0000
 1.2 25-Jun-2020  jruoho Reference PRs consistently.
 1.1 07-Jan-2014  gson branches: 1.1.4; 1.1.8;
Add some minimal tests of vmstat(1), to serve as regression tests
for PR bin/44518.
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 07-Jan-2014  tls file t_vmstat.sh was added on branch tls-maxphys on 2014-08-20 00:04:53 +0000
 1.1.4.2 22-May-2014  yamt 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")
 1.1.4.1 07-Jan-2014  yamt file t_vmstat.sh was added on branch yamt-pagecache on 2014-05-22 11:42:24 +0000
 1.3 15-Jan-2023  rillig tests/lint: add basic tests for lint (not lint1 or lint2)
 1.2 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.24 17-Jun-2022  rillig tests/lint: move check-expect.lua to tests/lint1

It is only used for testing lint1, not for lint2 or xlint.
 1.23 17-Jun-2022  rillig 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'.
 1.22 17-Jun-2022  rillig tests/lint: treat a missing .exp file like an empty one

Previously, a missing .exp file skipped all the checks, that is, the
tests wouldn't fail if there were some unexpected new message.
 1.21 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.20 17-Jun-2022  rillig tests/lint: rename local variables in check-expect.lua

Enough time has passed since I wrote that little program to make me
forget the naming scheme I had in mind back then. Prefix the variable
names with the source of their data, 'c_' or 'exp_', to provide a bit of
orientation.

No functional change.
 1.19 17-Jun-2022  rillig tests/lint: do not interpret 'expect:' comments, only 'expect+-n:'

Only the tests in msg_*.c had used the short form of the 'expect:'
comments. The other tests used the more detailed variant 'expect+n:' or
'expect-n:'.
 1.18 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.17 16-Jun-2022  rillig 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.
 1.16 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.15 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.14 07-Dec-2021  rillig tests/lint: make error handling simpler

The previous form was better suited for integrated unit tests (as in
distrib/sets/fmt-list). These small validation programs are easy enough
to be tested from the command line though.
 1.13 05-Sep-2021  rillig tests/lint: document placement of lint comments
 1.12 21-Aug-2021  rillig tests/lint: suggest better quickfix for expected lint diagnostics

The /* expect */ comments are usually so detailed that they are placed
in a line of their own, referring to the following line.
 1.11 19-Aug-2021  rillig 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.
 1.10 05-Jul-2021  rillig tests/lint: fix check-expect.lua for empty .exp file

An absent .exp file is equivalent to an empty .exp file. In neither of
these cases must the corresponding .c file declare any expected
diagnostics.
 1.9 05-Jul-2021  rillig tests/lint: remove unused variables
 1.8 08-Apr-2021  rillig 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.
 1.7 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.6 28-Feb-2021  rillig tests/lint: force 'expect' annotations
 1.5 27-Feb-2021  rillig tests/lint: allow 'expect' comments to refer to other lines

This allows /* expect+1: ... */ to refer to the following line, as well
as /* expect-1: ... */ to refer to the previous line. This avoids
horizontal scrolling to see the expectations, it also allows these
expectations comments to be more verbose, mentioning the whole
diagnostic in many cases.

The 'expect' comments don't need to be at the end of a line anymore
since that was rather surprising. The one 'expect' comment that had not
been at the end of the line was in d_c99_bool_strict.c and was not
intended to be ignored.
 1.4 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.3 20-Feb-2021  rillig lint: ensure that '# line' directives in tests are correct

It's too easy to forget one of them when adding or removing some lines.
This would make it more difficult to locate the lines referenced in the
error messages.
 1.2 16-Jan-2021  rillig lint: prepare to make strict bool mode even stricter

Currently, strict bool mode still allows integer constant expressions to
be converted implicitly to bool. This is something that other languages
such as Go, Java, C#, Pascal don't allow.

By providing a custom implementation of <stdbool.h> that defines false
and true to custom bool constant identifiers, lint will cover these
cases as well.

To prepare for this, reword the rules and restructure the tests in
d_c99_bool_strict.c.
 1.1 12-Jan-2021  rillig lint: add new check for strict bool mode

In strict bool mode, bool is considered incompatible with all other
scalar types, just as in Java, C#, Pascal.

The controlling expressions in if statements, while loops, for loops and
the '?:' operator must be of type bool. The logical operators work on
bool instead of int, the bitwise operators accept both integer and bool.
The arithmetic operators don't accept bool.

Since <stdbool.h> implements bool using C preprocessor macros instead of
predefining the identifiers "true" and "false", the integer constants 0
and 1 may be used in all contexts that require a bool expression.
Except from these, no implicit conversion between bool and scalar types
is allowed.

See usr.bin/tests/xlint/lint1/d_c99_bool_strict.c for more details.

The command line option -T has been chosen because all obvious choices
(-b or -B for bool, -s or -S for strict) are already in use. The -T may
stand for "types are checked strictly".

The default behavior of lint doesn't change. The strict bool check is
purely optional.

An example program for strict bool mode is usr.bin/make, which has been
using explicit comparisons such as p != NULL, ch != '\0' or n > 0 in
most places for a long time now, even before the refactoring in 2020.
 1.142 08-Jun-2024  rillig 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.
 1.141 23-Apr-2023  rillig tests/lint: test command line parsing for message and query IDs

The parsing methods differ but shouldn't.
 1.140 05-Feb-2023  rillig tests/lint: fix source directory for looking up the .exp-ln files
 1.139 05-Feb-2023  rillig tests/lint1: the redundantly listed files contained .exp-ln as well
 1.138 05-Feb-2023  rillig tests/lint: fix resolving of wildcards in builds from other directories
 1.137 05-Feb-2023  rillig tests/lint: remove redundancy from Makefile

The list of test files is already kept in distrib/sets/lists/tests/mi.
 1.136 05-Feb-2023  rillig 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.
 1.135 29-Jan-2023  rillig tests/lint: merge tests for '>>'
 1.134 22-Jan-2023  rillig tests/lint: merge tests for declaration after statement
 1.133 21-Jan-2023  rillig 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.
 1.132 21-Jan-2023  rillig tests/lint: test _Atomic, added in C11
 1.131 15-Jan-2023  rillig tests/lint: add test for parsing sizeof expressions
 1.130 04-Jan-2023  rillig tests/lint: merge tests for ':?' with null pointer constant
 1.129 05-Jul-2022  rillig 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@
 1.128 17-Jun-2022  rillig tests/lint: move check-expect.lua to tests/lint1

It is only used for testing lint1, not for lint2 or xlint.
 1.127 17-Jun-2022  rillig 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'.
 1.126 16-Jun-2022  rillig 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.
 1.125 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.124 10-Jun-2022  rillig 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.
 1.123 12-May-2022  rillig tests/lint: add more tests for __alignof__
 1.122 12-May-2022  rillig 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.
 1.121 28-Apr-2022  rillig 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.
 1.120 16-Apr-2022  rillig lint: fix instructions for adding a new test
 1.119 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.118 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.117 20-Dec-2021  rillig tests/lint: test excess braces around initializers
 1.116 16-Dec-2021  rillig tests/lint: remove generated shell program on 'make clean'
 1.115 06-Dec-2021  rillig tests/lint: demonstrate wrong warning for __builtin_alloca
 1.114 30-Oct-2021  rillig 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.
 1.113 26-Sep-2021  rillig 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.
 1.112 13-Sep-2021  rillig 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.
 1.111 12-Sep-2021  rillig 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.
 1.110 10-Sep-2021  rillig tests/lint: test line number tracking with \v and \f
 1.109 03-Sep-2021  rillig tests/lint: test GCC builtins for overflow in strict bool mode

Seen in inetd.c.
 1.108 31-Aug-2021  rillig 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.
 1.107 25-Aug-2021  rillig tests/lint: test conversion from long long to intptr_t on ilp32

Seen in usr.bin/make/var.c:1608.
 1.106 22-Aug-2021  rillig tests/lint: demonstrate wrong constant folding in strict bool mode

Found while investigating wrong constant folding in default mode.
 1.105 19-Aug-2021  rillig 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.
 1.104 16-Aug-2021  rillig tests/lint: test arithmetic promotions and enums
 1.103 09-Aug-2021  rillig 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'.
 1.102 05-Aug-2021  rillig tests/lint: test emitting 128-bit integer types for lint2
 1.101 03-Aug-2021  rillig tests/lint: test GCC extension for casting to union type
 1.100 03-Aug-2021  rillig tests/lint: test casting a struct to another struct
 1.99 01-Aug-2021  rillig tests/lint: test the usual arithmetic conversions in traditional C
 1.98 01-Aug-2021  rillig tests/lint: test the usual arithmetic conversions

The function 'balance' does not mention __uint128_t and nevertheless
works as expected. Need to investigate further.
 1.97 25-Jul-2021  rillig tests/lint: cover every code line in the grammar
 1.96 25-Jul-2021  rillig tests/lint: test declarators with attributes
 1.95 25-Jul-2021  rillig tests/lint: demonstrate missing support for GCC typeof
 1.94 25-Jul-2021  rillig 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.
 1.93 25-Jul-2021  rillig tests/lint: test parsing of type_name
 1.92 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.91 15-Jul-2021  rillig tests/lint: test struct declarations
 1.90 15-Jul-2021  rillig tests/lint: test precedence of operators
 1.89 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.88 13-Jul-2021  rillig tests/lint: test binary integer literals and underscores
 1.87 13-Jul-2021  rillig 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.
 1.86 11-Jul-2021  rillig lint: support __attribute__((hot))

The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.
 1.85 11-Jul-2021  rillig tests/lint: test dangling else
 1.84 10-Jul-2021  rillig tests/lint: test declarations
 1.83 10-Jul-2021  rillig tests/lint: add more tests for covering the grammar
 1.82 09-Jul-2021  rillig 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.
 1.81 08-Jul-2021  rillig 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.
 1.80 06-Jul-2021  rillig 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.
 1.79 04-Jul-2021  rillig test/lint: demonstrate wrong warnings for 128-bit shifts
 1.78 04-Jul-2021  rillig lint: remove remaining support for lvalue casts

These had been GCC extensions until GCC 3.4, they were removed in GCC
4.0.
 1.77 04-Jul-2021  rillig tests/lint: re-enable test c99_bool_strict_suppressed

It had been disabled accidentally in the previous commit.
 1.76 04-Jul-2021  rillig 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.
 1.75 04-Jul-2021  rillig tests/lint: add test for suppressing errors in strict bool mode
 1.74 03-Jul-2021  rillig 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.
 1.73 02-Jul-2021  rillig tests/lint: add test for array subscripts in C99 initialization
 1.72 29-Jun-2021  rillig 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.
 1.71 29-Jun-2021  rillig 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".
 1.70 29-Jun-2021  rillig tests/lint: add 'make accept' to update the expected output
 1.69 29-Jun-2021  rillig 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.
 1.68 27-Jun-2021  rillig 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".
 1.67 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.66 27-Jun-2021  rillig tests/lint: rename expected .ln file to .exp-ln

This way, the hack for suffixes is no longer needed.
 1.65 20-Jun-2021  rillig tests/lint: test syntax error in initialization using designator

This test prepares the upcoming refactoring of the grammar.
 1.64 19-Jun-2021  rillig lint: fix endless loop on unfinished comment at EOF

Found using afl.
 1.63 19-Jun-2021  rillig lint: fix assertion after malformed for loop

Found using afl.
 1.62 19-Jun-2021  rillig lint: fix assertion failure in struct with unnamed member

Found using afl.
 1.61 19-Jun-2021  rillig lint: fix crash in malformed initialization
 1.60 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.59 25-May-2021  rillig 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.
 1.58 16-May-2021  rillig 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]
 1.57 15-May-2021  rillig 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.
 1.56 14-May-2021  rillig tests/lint: test bitwise mismatch in switch statement
 1.55 02-May-2021  rillig branches: 1.55.2;
tests/lint: add test for bit-field types in GCC mode
 1.54 02-May-2021  rillig tests/lint: demonstrate missing support for __packed __aligned
 1.53 30-Apr-2021  rillig tests/lint: add very basic tests for GCC __attribute__
 1.52 22-Apr-2021  rillig tests/lint: add test for typeof after statement

Found by christos@.
 1.51 21-Apr-2021  christos Put things back, emit.ln it was meant to be there.
 1.50 21-Apr-2021  christos remove emit.ln; looks like an accident and breaks the build.
 1.49 21-Apr-2021  rillig tests/lint: fix the hack for emit.ln to also work if MKUPDATE != "no"
 1.48 20-Apr-2021  rillig 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
 1.47 20-Apr-2021  rillig 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
 1.46 18-Apr-2021  rillig tests/lint: record all files from FILES in distrib/sets/lists/tests/mi
 1.45 18-Apr-2021  rillig tests/lint: add emit.ln to the release files
 1.44 18-Apr-2021  rillig 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.
 1.43 17-Apr-2021  rillig tests/lint: demonstrate assertion failure in initialization
 1.42 14-Apr-2021  rillig lint: add test for newly added message about static array size
 1.41 09-Apr-2021  rillig tests/lint: demonstrate wrong lint warning about complex variables
 1.40 08-Apr-2021  rillig 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.
 1.39 05-Apr-2021  rillig 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
 1.38 02-Apr-2021  rillig tests/lint: prevent typo from tree.c 1.264 from happening again
 1.37 28-Mar-2021  rillig 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.
 1.36 23-Mar-2021  rillig 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.
 1.35 07-Mar-2021  rillig lint: in strict C mode, warn about initialization with '[a ... b]'

https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html
 1.34 28-Feb-2021  rillig lint: fix null pointer dereference on parse error

Fixes PR bin/22119.
 1.33 28-Feb-2021  rillig lint: add test to demonstrate that PR bin/20264 has been fixed
 1.32 21-Feb-2021  rillig lint: add another test for C99 initializers
 1.31 19-Feb-2021  rillig lint: warn about mismatch in getopt handling
 1.30 17-Jan-2021  rillig lint: add more tests for system headers in strict bool mode
 1.29 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.28 10-Jan-2021  rillig lint: add test for triggering assertion failures in lint1
 1.27 10-Jan-2021  rillig 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.
 1.26 10-Jan-2021  rillig lint: demonstrate wrong handling of conversion to _Bool
 1.25 02-Jan-2021  rillig 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.
 1.24 01-Jan-2021  rillig lint: demonstrate bug in handling of nested C9X struct initializers
 1.23 01-Jan-2021  rillig lint: fix segmentation fault when checking returned enum types (211)
 1.22 31-Dec-2020  rillig lint: check that in "if (cond)", cond is scalar
 1.21 30-Dec-2020  rillig lint: add test for old style function arguments
 1.20 28-Dec-2020  rillig lint1: add forgotten tests
 1.19 28-Dec-2020  rillig 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.
 1.18 28-Dec-2020  rillig lint1: add test for initializing nested structs

Discovered in var.c 1.774 from 2020-12-28.
 1.17 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.16 28-Dec-2020  rillig lint: sort tests by name
 1.15 06-Mar-2017  christos add builtin_offsetof
 1.14 06-Mar-2017  christos add a test for a typeof cast
 1.13 19-Aug-2016  christos branches: 1.13.2;
Add union cast test
 1.12 18-Aug-2016  christos new test for struct that only has anon members, and that the size of struct
is computer right.
 1.11 14-Oct-2015  christos branches: 1.11.2;
Add an anonymous struct test
 1.10 29-Jul-2015  christos new test
 1.9 28-Jul-2015  christos new c99 init test found by xorg's Iconify.c
 1.8 01-Jul-2015  christos new test.
 1.7 11-May-2015  christos add one more test
 1.6 03-Apr-2015  christos add test for typename as a function param
 1.5 20-Nov-2014  christos test for c99 flexible packed arrays
 1.4 20-Nov-2014  christos Add one more test
 1.3 17-Apr-2014  christos add more tests
 1.2 04-Feb-2014  njoly branches: 1.2.2;
Handle another declaration after statement case for lint in c99 mode.
Add the corresponding testcase.
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.4;
Deprecate tests/util.
 1.1.4.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.3 22-May-2014  yamt 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")
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.11.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.13.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.55.2.1 31-May-2021  cjep sync with head
 1.18 27-Feb-2025  rillig lint: normalize whitespace
 1.17 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.16 10-Jul-2024  rillig tests/lint: allow empty lines in .exp-ln files

The generated .ln files neither contain spaces nor empty lines. To make
the input more human-readable, allow empty lines in the expected .ln
files.
 1.15 28-Jan-2024  rillig branches: 1.15.2;
tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.14 08-Jul-2023  rillig tests/lint: automate accepting changed test results
 1.13 08-Jul-2023  rillig tests/lint: only overwrite .exp files if the output actually changes
 1.12 28-Jun-2023  rillig tests/lint: do not overwrite expected files that only differ in spaces
 1.11 19-Jun-2022  rillig tests/lint: add quotes around placeholders in a few messages
 1.10 17-Jun-2022  rillig 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'.
 1.9 16-Apr-2022  rillig lint: in C99 mode, allow trailing comma in enum declarations

Adjust the test to be run in C90 mode instead of traditional mode, since
traditional C didn't have enums.
 1.8 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.7 16-Aug-2021  rillig tests/lint: remove unintended debugging output
 1.6 16-Aug-2021  rillig tests/lint: fix check for expected message in msg tests
 1.5 08-Aug-2021  rillig tests/lint: clean up accept.sh, document test for removed assertion
 1.4 05-Aug-2021  rillig tests/lint: test emitting 128-bit integer types for lint2
 1.3 11-Jul-2021  rillig tests/lint: when accepting test results, skip crashes
 1.2 11-Jul-2021  rillig tests/lint: suppress ShellCheck warnings for intentional violations

The undeclared variables are generated by the AWK program.
The variable 'flags' must be split into words at exactly this point.
 1.1 29-Jun-2021  rillig tests/lint: add 'make accept' to update the expected output
 1.15.2.1 02-Aug-2025  perseant Sync with HEAD
 1.11 18-Sep-2025  rillig lint: in C23 mode, do not warn about an empty parameter list
 1.10 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.9 24-Feb-2025  rillig lint: remove no-op variant of the unary '&' operator

Neither K&R 1978 nor any of the C standards mentions that &function or
&array would be a no-op. This no-op behavior produced wrong warnings in
sbin/gpt.
 1.8 30-Nov-2024  rillig tests/lint: add a few more tests to increase code coverage
 1.7 07-May-2024  rillig branches: 1.7.2;
tests/lint: show that in C23 mode, bool is not yet defined

The tests in C11 and C23 mode look the same right now but will change
soon.

The warnings in the C11 test disappeared because after the first error,
warnings about unused variables are suppressed by check_variable_usage,
as they are often wrong.
 1.6 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.5 03-Aug-2023  rillig lint: make '_Static_assert' only available in C11 or C23 mode
 1.4 28-Jul-2023  rillig tests/lint: test declarations in C11 and C23
 1.3 13-Jul-2023  rillig lint: in C23 mode, recognize the keyword 'thread_local'
 1.2 12-Jul-2023  rillig lint: reject _Noreturn if it occurs in invalid places

C11 introduced _Noreturn as a function-specifier, not as a type
attribute. The latter may occur in more places.
 1.1 12-Jul-2023  rillig tests/lint: add test for _Noreturn from C11
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 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.4 07-Jul-2023  rillig tests/lint: merge duplicate tests for C11 _Atomic
 1.3 21-Jan-2023  rillig lint: add support for C11 '_Atomic' as atomic-type-specifier

Following the C11 grammar, the keyword '_Atomic' needs to be a separate
syntactic category, to avoid further conflicts in the grammar.

The two newly added conflicts in the grammar would come into play when
mixing traditional C with C11, in a type name without an implicit 'int'.
If the type '_Atomic(int)*' were parsed as '_Atomic int(int)*', the
trailing '*' would be a syntax error.
 1.2 21-Jan-2023  rillig 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.
 1.1 21-Jan-2023  rillig tests/lint: test _Atomic, added in C11
 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
 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.10 17-Jun-2022  rillig 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'.
 1.9 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.8 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.7 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.6 11-Jul-2021  rillig tests/lint: demonstrate that _Generic must be a primary_expression
 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 18-Sep-2025  rillig lint: in C23 mode, do not warn about an empty parameter list
 1.17 30-Nov-2024  rillig tests/lint: add a few more tests to increase code coverage
 1.16 17-Jun-2024  rillig branches: 1.16.2;
lint: don't warn about unused C23 [[maybe_unused]] parameters
 1.15 17-Jun-2024  rillig lint: accept C23 [[fallthrough]] statements

Needed by bind9/getaddresses.c:137.
 1.14 17-Jun-2024  rillig lint: accept C23 attributes at the beginning of a type declaration

The switch to GCC 12 brings support for C23, and localtime.c uses it to
mark [[maybe_unused]] parameters.

For now, accept C23 attributes independently from the language level. In
the end, the whole tree with the exception of the tools should be
switched to C23 mode instead of the current C99 mode.

For now, don't actually mark the argument as possibly unused, as lint
currently ignores __attribute__((__unused__)) as well.
 1.13 11-May-2024  rillig lint: parse but otherwise ignore C23 attributes

The C23 attributes are only parsed before an expression in an expression
statement, as a proof of concept. Other places will follow later.
 1.12 09-May-2024  rillig lint: in C23 mode, allow storage classes in compound literals
 1.11 09-May-2024  rillig lint: in C23 mode, support the nullptr constant
 1.10 07-May-2024  rillig lint: in C23 mode, support the keywords 'bool', 'false' and 'true'
 1.9 07-May-2024  rillig tests/lint: show that in C23 mode, bool is not yet defined

The tests in C11 and C23 mode look the same right now but will change
soon.

The warnings in the C11 test disappeared because after the first error,
warnings about unused variables are suppressed by check_variable_usage,
as they are often wrong.
 1.8 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.7 28-Jul-2023  rillig tests/lint: test declarations in C11 and C23
 1.6 25-Jul-2023  rillig lint: allow 'thread_local' to be combined with 'static'
 1.5 15-Jul-2023  rillig lint: allow 'extern' and 'thread_local' to be combined
 1.4 15-Jul-2023  rillig tests/lint: test 'extern thread_local' storage classes

Seen in external/mpl/bind/dist/lib/isc/pthreads/include/isc/thread.h:32.
 1.3 14-Jul-2023  rillig lint: clean up comments, add a test for the '?:' operator
 1.2 13-Jul-2023  rillig lint: in C23 mode, recognize the keyword 'thread_local'
 1.1 02-Jul-2023  rillig tests/lint: add C23 tests
 1.16.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 30-Nov-2024  rillig tests/lint: add a few more tests to increase code coverage
 1.3 26-Aug-2023  rillig branches: 1.3.2;
lint: make diagnostics about ANSI C more international
 1.2 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.1 25-Jul-2021  rillig tests/lint: cover every code line in the grammar
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 17-Jun-2022  rillig 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'.
 1.1 25-Jul-2021  rillig tests/lint: cover every code line in the grammar
 1.4 07-Jul-2023  rillig tests/lint: merge duplicate tests for C11 _Atomic
 1.3 21-Jan-2023  rillig lint: add support for C11 '_Atomic' as atomic-type-specifier

Following the C11 grammar, the keyword '_Atomic' needs to be a separate
syntactic category, to avoid further conflicts in the grammar.

The two newly added conflicts in the grammar would come into play when
mixing traditional C with C11, in a type name without an implicit 'int'.
If the type '_Atomic(int)*' were parsed as '_Atomic int(int)*', the
trailing '*' would be a syntax error.
 1.2 21-Jan-2023  rillig 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.
 1.1 21-Jan-2023  rillig tests/lint: test _Atomic, added in C11
 1.6 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.5 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.4 08-Aug-2021  rillig tests/lint: clean up accept.sh, document test for removed assertion
 1.3 05-Jul-2021  rillig tests/lint: fix check-expect.lua for empty .exp file

An absent .exp file is equivalent to an empty .exp file. In neither of
these cases must the corresponding .c file declare any expected
diagnostics.
 1.2 04-Jul-2021  rillig 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.
 1.1 04-Jul-2021  rillig tests/lint: add test for suppressing errors in strict bool mode
 1.2 04-Jul-2021  rillig 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.
 1.1 04-Jul-2021  rillig tests/lint: add test for suppressing errors in strict bool mode
 1.4 05-Feb-2023  rillig 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.
 1.3 02-Jul-2021  rillig tests/lint: encode the array length in the diagnostic
 1.2 02-Jul-2021  rillig lint: fix initialization of array of unknown size

The size of the resulting array was computed wrong.
 1.1 02-Jul-2021  rillig tests/lint: add test for array subscripts in C99 initialization
 1.4 17-Jun-2022  rillig 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'.
 1.3 02-Jul-2021  rillig tests/lint: encode the array length in the diagnostic
 1.2 02-Jul-2021  rillig lint: fix initialization of array of unknown size

The size of the resulting array was computed wrong.
 1.1 02-Jul-2021  rillig tests/lint: add test for array subscripts in C99 initialization
 1.3 05-Feb-2023  rillig 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.
 1.2 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.1 20-Jun-2021  rillig tests/lint: test syntax error in initialization using designator

This test prepares the upcoming refactoring of the grammar.
 1.3 17-Jun-2022  rillig 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'.
 1.2 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.1 20-Jun-2021  rillig tests/lint: test syntax error in initialization using designator

This test prepares the upcoming refactoring of the grammar.
 1.14 27-Feb-2025  rillig lint: normalize whitespace
 1.13 03-Jan-2025  rillig tests/lint: run lint1 tests in one fell swoop

This generates fewer details in the ATF test reports, as the
platform-specific tests that are skipped are not mentioned individually.
 1.12 28-Jan-2024  rillig branches: 1.12.2;
tests/lint: enforce diagnostics to be listed in chronologic order

While here, fix the tests on uchar platforms.
 1.11 28-Jan-2024  rillig tests/lint: sort diagnostics in ilp32 tests chronologically
 1.10 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.9 27-Jan-2024  rillig tests/lint: test integer constants in different language levels
 1.8 11-Aug-2023  rillig tests/lint: test parsing of preprocessing directives
 1.7 08-Jul-2023  rillig tests/lint: fix a few ilp32 tests
 1.6 08-Jul-2023  rillig tests/lint: automate accepting changed test results
 1.5 06-Jul-2023  rillig tests/lint: ensure consistent preprocessor filenames in tests

The deviations often happen when copying or renaming tests.
 1.4 01-Jul-2023  rillig lint: clean up typos
 1.3 28-Jun-2023  rillig tests/lint: fix preprocessor line number validation

When running the tests via ATF, the filename was an absolute filename,
while the preprocessing line in the test file uses a relative filename.
These two didn't match.
 1.2 19-Jun-2022  rillig tests/lint: add quotes around placeholders in a few messages
 1.1 17-Jun-2022  rillig tests/lint: move check-expect.lua to tests/lint1

It is only used for testing lint1, not for lint2 or xlint.
 1.12.2.1 02-Aug-2025  perseant Sync with HEAD
 1.12 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.11 30-Jun-2023  rillig tests/lint: extend tests for sizeof and alignof
 1.10 30-Jun-2023  rillig lint: make alignof(incomplete enum) an error
 1.9 30-Jun-2023  rillig tests/lint: add more tests for sizeof, offsetof, alignof
 1.8 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.7 12-May-2022  rillig lint: merge duplicate grammar rules for __alignof__ expr

This allows expressions like '__alignof__(ptr)->member', just as with
'sizeof'.

The upper rule in the grammar was preferred over the lower rule since it
shifted the T_LPAREN instead of reducing unary_expression. Its
implementation invoked undefined behavior if the expression was NULL
since it didn't assign anything to $$.
 1.6 12-May-2022  rillig tests/lint: add more tests for __alignof__
 1.5 12-May-2022  rillig lint: add support for __alignof__ expr, a GCC extension

Seen in lib/libc/gmon/gmon.c:153.
 1.4 12-May-2022  rillig lint: fix support for __alignof__, add support for __alignof

Broken since lex.c 1.129 from yesterday.
 1.3 12-May-2022  rillig 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.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_alignof.c was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.6 17-Jun-2022  rillig 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'.
 1.5 12-May-2022  rillig lint: merge duplicate grammar rules for __alignof__ expr

This allows expressions like '__alignof__(ptr)->member', just as with
'sizeof'.

The upper rule in the grammar was preferred over the lower rule since it
shifted the T_LPAREN instead of reducing unary_expression. Its
implementation invoked undefined behavior if the expression was NULL
since it didn't assign anything to $$.
 1.4 12-May-2022  rillig tests/lint: add more tests for __alignof__
 1.3 12-May-2022  rillig lint: add support for __alignof__ expr, a GCC extension

Seen in lib/libc/gmon/gmon.c:153.
 1.2 12-May-2022  rillig lint: fix support for __alignof__, add support for __alignof

Broken since lex.c 1.129 from yesterday.
 1.1 12-May-2022  rillig 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.
 1.3 09-Jan-2024  rillig lint: allow complex offsetof(type, member-designator)

Both GCC 11 and Clang 8 accept member-designators that are not
identifiers but designator sequences, such as in 'offsetof(struct stat,
st_atim.tv_sec)', so make lint accept them as well.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 06-Mar-2017  christos branches: 1.1.2; 1.1.4;
new test
 1.1.4.2 21-Apr-2017  bouyer Sync with HEAD
 1.1.4.1 06-Mar-2017  bouyer file d_bltinoffsetof.c was added on branch bouyer-socketcan on 2017-04-21 16:54:13 +0000
 1.1.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.2.1 06-Mar-2017  pgoyette file d_bltinoffsetof.c was added on branch pgoyette-localcount on 2017-03-20 06:58:02 +0000
 1.4 10-Jul-2021  rillig lint: remove noclass_declmods from grammar

That rule was hard to understand since it contained clrtyp but not the
corresponding deftyp. It's easier to read when a grammar rule contains
both clrtyp and deftyp in the same line.

C99 does not mention the term 'decl-modifier' anywhere, and in fact the
only thing that this grammar rule allowed was a type-qualifier-list.
The new name better reflect this.

No functional change.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 14-Oct-2015  christos Add an anonymous struct test
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 20-Feb-2021  rillig lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features. All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests. This will
be necessary for reworking the initializer code to actually conform to
C99.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 18-Aug-2016  christos branches: 1.1.2;
new test for struct that only has anon members, and that the size of struct
is computer right.
 1.1.2.2 14-Sep-2016  pgoyette Sync with HEAD
 1.1.2.1 18-Aug-2016  pgoyette file d_c99_anon_union.c was added on branch pgoyette-localcount on 2016-09-14 03:04:19 +0000
 1.11 03-Jul-2023  rillig tests/lint: clean up tests for C99 bool
 1.10 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9 16-Jan-2022  rillig tests/lint: update comment to reality
 1.8 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.7 30-Mar-2021  rillig lint: rewrite handling of initializations, fixing several bugs

The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.

The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.

The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.

Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.

The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.

The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
 1.6 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.5 10-Jan-2021  rillig lint: explain missing error for _Bool constant expressions
 1.4 10-Jan-2021  rillig lint: fix conversion of non-constant scalar to _Bool
 1.3 10-Jan-2021  rillig lint: fix conversion of constant expressions to _Bool
 1.2 10-Jan-2021  rillig lint: add test for converting non-constant expressions to _Bool
 1.1 10-Jan-2021  rillig lint: demonstrate wrong handling of conversion to _Bool
 1.9 17-Jun-2022  rillig 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'.
 1.8 16-Jan-2022  rillig tests/lint: update comment to reality
 1.7 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.6 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.5 10-Jan-2021  rillig lint: explain missing error for _Bool constant expressions
 1.4 10-Jan-2021  rillig lint: fix conversion of non-constant scalar to _Bool
 1.3 10-Jan-2021  rillig lint: fix conversion of constant expressions to _Bool
 1.2 10-Jan-2021  rillig lint: add test for converting non-constant expressions to _Bool
 1.1 10-Jan-2021  rillig lint: demonstrate wrong handling of conversion to _Bool
 1.56 07-Jul-2025  rillig lint: disable message 207 about 'loop not entered at top'

The purpose of the message is unclear, and it produces several warnings
in legitimate code.
 1.55 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.54 10-Apr-2025  rillig lint: remove now-unnecessary CONSTCOND comments
 1.53 10-Apr-2025  rillig lint: do not warn about constant operand of '!'

Like its related warning about a constant condition, the purpose of this
warning is unclear, and suppressing the warning requires special lint
comments, thus cluttering the code.

The message itself is still kept in err.c to keep the '-X 239' option
valid. These LINTFLAGS will be removed in a follow-up commit.

The lint comments /* CONSTCOND */, as well as its more verbose forms /*
CONSTANTCOND */ and /* CONSTANTCONDITION */ are no longer needed and can
be removed.
 1.52 06-Apr-2025  rillig lint: remove warning about 'constant in conditional context'

In a full NetBSD build, this warning occurs about 2400 times, making it
the top 9 warning overall. There is no evidence though that this
warning detects any real bugs, so the noise it makes is not warranted.

In this first step, the warning is still listed in the lint(7) manual
page, as removing it from there would immediately make all places with
"LINTFLAGS += -X 161" fail. These '-X 161' flags cannot be removed
first because then, the warning would step in and make the build fail.

The next step is to clean up the "-X 161" options from all LINTFLAGS,
and then the final step is to remove the warning from err.c.
 1.51 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.50 12-May-2024  rillig branches: 1.50.2;
lint: in strict bool mode, allow do-while-0

Even though 0 is not a boolean constant, allow this common idiom, to
help in those cases where the C preprocessor used by lint does not mark
tokens as coming from system headers (Clang).
 1.49 12-May-2024  rillig tests/lint: clean up tests for strict bool mode
 1.48 30-Dec-2023  rillig tests/lint: sync comments in test for strict bool mode with reality
 1.47 30-Dec-2023  rillig lint: in strict bool mode, allow 'a & b' in controlling expressions

Previously, the expression 'a & b' was only treated as bool if 'a' had
enum type. This didn't cover cases in which bit masks were implemented
using integer types instead of enum sets.
 1.46 30-Dec-2023  rillig tests/lint: test '&' for non-enum types in strict bool mode
 1.45 10-Dec-2023  rillig lint: clean up comments

No functional change.
 1.44 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.43 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.42 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.41 03-Jul-2023  rillig tests/lint: clean up tests for C99 bool
 1.40 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.39 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.38 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.37 27-Feb-2022  rillig lint: encode lifetime of allocated memory in the function names

No functional change.
 1.36 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.35 20-Nov-2021  rillig tests/lint: fix negation in explanation for strict bool mode
 1.34 16-Nov-2021  rillig lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.
 1.33 16-Nov-2021  rillig lint: fix wrong error message in strict bool mode

This fix only affects the last token before a macro, as well as the last
token in the expanded macro.
 1.32 16-Nov-2021  rillig tests/lint: explain the missing error message in strict bool mode

There are 2 separate bugs that lead to the missing error message.

The first bug is that when parsing a name, the information about whether
that name comes from a system header is not properly recorded for the
last token before switching from or to a system header.

The second bug is that for determining whether the type of a function
call expression is relaxed, the types of the function call arguments are
taken into account, even though the type only depends on the function
itself. The same idea applies to the operators '<<' and '>>', as their
result type only depends on the left operand, at least since C90.
 1.31 14-Nov-2021  rillig tests/lint: demonstrate missing errors for strict bool mode

Seen in bin/echo/echo.c.
 1.30 04-Jul-2021  rillig lint: in strict bool mode, continue after error message

If a controlling expression is not of type bool but of any other scalar
type, keep the expression. Its value is still useful for control flow
analysis.

This prevents an assertion failure when running lint on the generated
scan.c, which contains a "while (1)" that does not stem from a system
header. If it did, lint would accept it, see tn_from_system_header. But
"scan.c" is not considered a system header. Maybe lint's definition of
a system header needs to be revisited.

After fixing this, there is another assertion failure though, so scan.c
is not yet ready to be inspected by lint.
 1.29 02-Jul-2021  rillig lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.
 1.28 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.27 23-Mar-2021  rillig tests/lint: fix outdated comments
 1.26 21-Mar-2021  rillig lint: fix reachability computation in if statements

Previously, only loop statements were considered for reachability. This
ignored the possibility of an early return in an if statement, or
unreachable branches.
 1.25 21-Mar-2021  rillig tests/lint: sync redundant documentation in test for strict bool mode
 1.24 20-Mar-2021  rillig lint: in strict bool mode, check initialization as well

C99 6.7.8p11 says for initialization that "the same type constraints and
conversions as for simple assignments apply", so actually apply them.
(I had just forgotten this "operator" when I first implemented strict
bool mode.)
 1.23 20-Mar-2021  rillig tests/lint: test initialization in strict bool mode

I somehow forgot to list INIT as one of the operators in
is_assignment_bool_or_other.
 1.22 27-Feb-2021  rillig tests/lint: allow 'expect' comments to refer to other lines

This allows /* expect+1: ... */ to refer to the following line, as well
as /* expect-1: ... */ to refer to the previous line. This avoids
horizontal scrolling to see the expectations, it also allows these
expectations comments to be more verbose, mentioning the whole
diagnostic in many cases.

The 'expect' comments don't need to be at the end of a line anymore
since that was rather surprising. The one 'expect' comment that had not
been at the end of the line was in d_c99_bool_strict.c and was not
intended to be ignored.
 1.21 20-Feb-2021  rillig lint: do not warn about 'do { ... } while (false)' in strict bool mode
 1.20 20-Feb-2021  rillig lint: add test for 'do { ... } while (false)' in strict bool mode

Right now, this variant of the popular macro pattern is flagged as
needing a /*CONSTCOND*/ annotation. As with 'do { ... } while (0)',
there is nothing wrong with this pattern, therefore there should be no
warning.
 1.19 20-Feb-2021  rillig lint: enable heuristics in test for strict bool mode

This is a preparation for allowing 'do { ... } while (false)', in
addition to the commonly used 'do { ... } while (0)', without declaring
the controlling expression /*CONSTCOND*/.
 1.18 20-Feb-2021  rillig lint: add test for using a bool as array index in strict bool mode
 1.17 17-Jan-2021  rillig lint: add more tests for system headers in strict bool mode
 1.16 17-Jan-2021  rillig lint: add test for macro from system header in strict bool mode

Seen in usr.bin/make/meta.c:1670: FD_ZERO(&readfds). These macros
cannot be fixed since system headers must not include <stdbool.h>.
Therefore INT constants should be accepted as controlling expressions as
well.
 1.15 17-Jan-2021  rillig lint: in strict bool mode, don't treat bool as arithmetic type
 1.14 17-Jan-2021  rillig lint: explain failing test case in strict bool mode
 1.13 17-Jan-2021  rillig lint: demonstrate wrong error message in strict bool mode
 1.12 16-Jan-2021  rillig lint: add missing warning for bool() == int
 1.11 16-Jan-2021  rillig lint: remove redundant calls to before_conversion
 1.10 16-Jan-2021  rillig lint: add test for missing check in strict bool mode
 1.9 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.8 16-Jan-2021  rillig lint: prepare to make strict bool mode even stricter

Currently, strict bool mode still allows integer constant expressions to
be converted implicitly to bool. This is something that other languages
such as Go, Java, C#, Pascal don't allow.

By providing a custom implementation of <stdbool.h> that defines false
and true to custom bool constant identifiers, lint will cover these
cases as well.

To prepare for this, reword the rules and restructure the tests in
d_c99_bool_strict.c.
 1.7 15-Jan-2021  rillig lint: add test for bool bit fields as operands of '|'
 1.6 15-Jan-2021  rillig lint: in strict bool mode, allow bool as operands of the comma operator
 1.5 15-Jan-2021  rillig lint: demonstrate wrong message for comma operator
 1.4 12-Jan-2021  rillig lint: add new check for strict bool mode

In strict bool mode, bool is considered incompatible with all other
scalar types, just as in Java, C#, Pascal.

The controlling expressions in if statements, while loops, for loops and
the '?:' operator must be of type bool. The logical operators work on
bool instead of int, the bitwise operators accept both integer and bool.
The arithmetic operators don't accept bool.

Since <stdbool.h> implements bool using C preprocessor macros instead of
predefining the identifiers "true" and "false", the integer constants 0
and 1 may be used in all contexts that require a bool expression.
Except from these, no implicit conversion between bool and scalar types
is allowed.

See usr.bin/tests/xlint/lint1/d_c99_bool_strict.c for more details.

The command line option -T has been chosen because all obvious choices
(-b or -B for bool, -s or -S for strict) are already in use. The -T may
stand for "types are checked strictly".

The default behavior of lint doesn't change. The strict bool check is
purely optional.

An example program for strict bool mode is usr.bin/make, which has been
using explicit comparisons such as p != NULL, ch != '\0' or n > 0 in
most places for a long time now, even before the refactoring in 2020.
 1.3 11-Jan-2021  rillig lint: extend test for strict _Bool handling

There is no danger in allowing (flags & FLAG) as a controlling
expression, provided that it is immediately compared to zero, such as in
an if statement or as the operand of a logical operator.
 1.2 10-Jan-2021  rillig lint: add enum flags to the test about strict boolean mode
 1.1 10-Jan-2021  rillig 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.
 1.50.2.1 02-Aug-2025  perseant Sync with HEAD
 1.34 17-Jun-2022  rillig 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'.
 1.33 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.32 16-Nov-2021  rillig lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.
 1.31 16-Nov-2021  rillig lint: fix wrong error message in strict bool mode

This fix only affects the last token before a macro, as well as the last
token in the expanded macro.
 1.30 16-Nov-2021  rillig tests/lint: explain the missing error message in strict bool mode

There are 2 separate bugs that lead to the missing error message.

The first bug is that when parsing a name, the information about whether
that name comes from a system header is not properly recorded for the
last token before switching from or to a system header.

The second bug is that for determining whether the type of a function
call expression is relaxed, the types of the function call arguments are
taken into account, even though the type only depends on the function
itself. The same idea applies to the operators '<<' and '>>', as their
result type only depends on the left operand, at least since C90.
 1.29 14-Nov-2021  rillig tests/lint: demonstrate missing errors for strict bool mode

Seen in bin/echo/echo.c.
 1.28 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.27 04-Jul-2021  rillig lint: in strict bool mode, continue after error message

If a controlling expression is not of type bool but of any other scalar
type, keep the expression. Its value is still useful for control flow
analysis.

This prevents an assertion failure when running lint on the generated
scan.c, which contains a "while (1)" that does not stem from a system
header. If it did, lint would accept it, see tn_from_system_header. But
"scan.c" is not considered a system header. Maybe lint's definition of
a system header needs to be revisited.

After fixing this, there is another assertion failure though, so scan.c
is not yet ready to be inspected by lint.
 1.26 02-Jul-2021  rillig lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.
 1.25 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.24 02-Apr-2021  rillig lint: reword message about constant argument to '!'

In the other messages, operators are typically written in their literal
form as well. Using single quotes disambiguates them from normal
punctuation.
 1.23 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.22 21-Mar-2021  rillig lint: fix reachability computation in if statements

Previously, only loop statements were considered for reachability. This
ignored the possibility of an early return in an if statement, or
unreachable branches.
 1.21 21-Mar-2021  rillig tests/lint: sync redundant documentation in test for strict bool mode
 1.20 20-Mar-2021  rillig lint: in strict bool mode, check initialization as well

C99 6.7.8p11 says for initialization that "the same type constraints and
conversions as for simple assignments apply", so actually apply them.
(I had just forgotten this "operator" when I first implemented strict
bool mode.)
 1.19 20-Feb-2021  rillig lint: do not warn about 'do { ... } while (false)' in strict bool mode
 1.18 20-Feb-2021  rillig lint: add test for 'do { ... } while (false)' in strict bool mode

Right now, this variant of the popular macro pattern is flagged as
needing a /*CONSTCOND*/ annotation. As with 'do { ... } while (0)',
there is nothing wrong with this pattern, therefore there should be no
warning.
 1.17 20-Feb-2021  rillig lint: enable heuristics in test for strict bool mode

This is a preparation for allowing 'do { ... } while (false)', in
addition to the commonly used 'do { ... } while (0)', without declaring
the controlling expression /*CONSTCOND*/.
 1.16 20-Feb-2021  rillig lint: add test for using a bool as array index in strict bool mode
 1.15 17-Jan-2021  rillig lint: add more tests for system headers in strict bool mode
 1.14 17-Jan-2021  rillig lint: add test for macro from system header in strict bool mode

Seen in usr.bin/make/meta.c:1670: FD_ZERO(&readfds). These macros
cannot be fixed since system headers must not include <stdbool.h>.
Therefore INT constants should be accepted as controlling expressions as
well.
 1.13 17-Jan-2021  rillig lint: in strict bool mode, don't treat bool as arithmetic type
 1.12 17-Jan-2021  rillig lint: explain failing test case in strict bool mode
 1.11 17-Jan-2021  rillig lint: demonstrate wrong error message in strict bool mode
 1.10 16-Jan-2021  rillig lint: simplify typeok_strict_bool_compatible
 1.9 16-Jan-2021  rillig lint: add missing warning for bool() == int
 1.8 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.7 16-Jan-2021  rillig lint: prepare to make strict bool mode even stricter

Currently, strict bool mode still allows integer constant expressions to
be converted implicitly to bool. This is something that other languages
such as Go, Java, C#, Pascal don't allow.

By providing a custom implementation of <stdbool.h> that defines false
and true to custom bool constant identifiers, lint will cover these
cases as well.

To prepare for this, reword the rules and restructure the tests in
d_c99_bool_strict.c.
 1.6 15-Jan-2021  rillig lint: add test for bool bit fields as operands of '|'
 1.5 15-Jan-2021  rillig lint: in strict bool mode, allow bool as operands of the comma operator
 1.4 15-Jan-2021  rillig lint: demonstrate wrong message for comma operator
 1.3 12-Jan-2021  rillig lint: add new check for strict bool mode

In strict bool mode, bool is considered incompatible with all other
scalar types, just as in Java, C#, Pascal.

The controlling expressions in if statements, while loops, for loops and
the '?:' operator must be of type bool. The logical operators work on
bool instead of int, the bitwise operators accept both integer and bool.
The arithmetic operators don't accept bool.

Since <stdbool.h> implements bool using C preprocessor macros instead of
predefining the identifiers "true" and "false", the integer constants 0
and 1 may be used in all contexts that require a bool expression.
Except from these, no implicit conversion between bool and scalar types
is allowed.

See usr.bin/tests/xlint/lint1/d_c99_bool_strict.c for more details.

The command line option -T has been chosen because all obvious choices
(-b or -B for bool, -s or -S for strict) are already in use. The -T may
stand for "types are checked strictly".

The default behavior of lint doesn't change. The strict bool check is
purely optional.

An example program for strict bool mode is usr.bin/make, which has been
using explicit comparisons such as p != NULL, ch != '\0' or n > 0 in
most places for a long time now, even before the refactoring in 2020.
 1.2 11-Jan-2021  rillig lint: extend test for strict _Bool handling

There is no danger in allowing (flags & FLAG) as a controlling
expression, provided that it is immediately compared to zero, such as in
an if statement or as the operand of a logical operator.
 1.1 10-Jan-2021  rillig 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.
 1.27 10-Apr-2025  rillig lint: remove now-unnecessary CONSTCOND comments
 1.26 20-Nov-2024  rillig tests/lint: clean up
 1.25 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.24 12-May-2024  rillig branches: 1.24.2;
lint: in strict bool mode, allow do-while-0

Even though 0 is not a boolean constant, allow this common idiom, to
help in those cases where the C preprocessor used by lint does not mark
tokens as coming from system headers (Clang).
 1.23 12-May-2024  rillig tests/lint: clean up tests for strict bool mode
 1.22 06-Aug-2023  rillig lint: since C99, a non-void function must return a value
 1.21 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.20 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.19 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.18 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.17 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.16 11-Jun-2022  rillig tests/lint: demonstrate wrong syshdr check in strict bool mode
 1.15 20-May-2022  rillig tests/lint: sync comment with reality
 1.14 19-May-2022  rillig lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.
 1.13 19-May-2022  rillig tests/lint: extend tests for type mismatch in strict bool mode

Seen in games/gomoku when calling curses functions.
 1.12 22-Dec-2021  rillig lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.
 1.11 22-Dec-2021  rillig lint: clean up lex.c

Rename 'struct kwtab' to 'struct keyword' since a single keyword is not
a whole keyword table.

Sync comment for lex_name with reality: sbuf_t no longer contains the
hash value.

Remove redundant tests for EOF, as EOF is neither a space nor a digit
nor an xdigit.

No functional change.
 1.10 21-Dec-2021  rillig tests/lint: remove false assumptions from comments

https://stackoverflow.com/q/65868752
 1.9 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.8 24-Jan-2021  rillig lint: improve introduction of test d_c99_bool_strict_syshdr
 1.7 24-Jan-2021  rillig lint: explain why !finite(x) is not allowed in strict bool mode
 1.6 23-Jan-2021  rillig lint: apply strict bool mode to lex.c

There are 2 remaining expressions:

In line 244, !(kw->kw_deco & deco) is a bitwise and. This is already
allowed for enums, it needs to be allowed for arbitrary integer
expressions as well. This covers the many places where plain integers
are used for bit fields, together with #define. This pattern is not as
typesafe as using enums, still it is common practice.

In line 769, the expression !finite(f) is a legitimate use of a function
that has return type int for traditional reasons. It's the same as for
ferror.

There are several other functions like unlink, open or strcmp that have
return type int as well, but with a different meaning. It is not yet
clear what the best way is to handle these different meanings. Having
to write finite(f) == 0 in strict bool mode doesn't look idiomatic, on
the other hand, !strcmp(s1, s2) is exactly the pattern that strict bool
mode wants to avoid.
 1.5 23-Jan-2021  rillig lint: fix error message for relaxed bool operations in system headers

In strict mode, allowing 1 as bool constant expression is probably not
needed in practice since most comparisons are != 0 instead of == 0.

Furthermore, in the expression (flags & 0x0002) == true, comparing with
true is misleading since the '==' operator can never evaluate to true in
this case.
 1.4 23-Jan-2021  rillig lint: fix two wrong error messages in strict bool mode

The strict bool mode gets complicated because for system headers the
rules need to be relaxed since they cannot be changed easily, often not at all.

Still, if lint validates a program in strict bool mode, that program
must run with equal behavior regarding boolean expressions even on a
pre-C99 platform.
 1.3 23-Jan-2021  rillig lint: extend test for strict bool mode and system headers
 1.2 17-Jan-2021  rillig lint: allow system headers to use int as bool, even in strict bool mode
 1.1 17-Jan-2021  rillig lint: add more tests for system headers in strict bool mode
 1.24.2.1 02-Aug-2025  perseant Sync with HEAD
 1.18 17-Jun-2022  rillig 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'.
 1.17 11-Jun-2022  rillig tests/lint: demonstrate wrong syshdr check in strict bool mode
 1.16 19-May-2022  rillig lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.
 1.15 19-May-2022  rillig tests/lint: extend tests for type mismatch in strict bool mode

Seen in games/gomoku when calling curses functions.
 1.14 22-Dec-2021  rillig lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.
 1.13 22-Dec-2021  rillig lint: clean up lex.c

Rename 'struct kwtab' to 'struct keyword' since a single keyword is not
a whole keyword table.

Sync comment for lex_name with reality: sbuf_t no longer contains the
hash value.

Remove redundant tests for EOF, as EOF is neither a space nor a digit
nor an xdigit.

No functional change.
 1.12 21-Dec-2021  rillig tests/lint: remove false assumptions from comments

https://stackoverflow.com/q/65868752
 1.11 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.10 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.9 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.8 24-Jan-2021  rillig lint: improve introduction of test d_c99_bool_strict_syshdr
 1.7 24-Jan-2021  rillig lint: explain why !finite(x) is not allowed in strict bool mode
 1.6 23-Jan-2021  rillig lint: apply strict bool mode to lex.c

There are 2 remaining expressions:

In line 244, !(kw->kw_deco & deco) is a bitwise and. This is already
allowed for enums, it needs to be allowed for arbitrary integer
expressions as well. This covers the many places where plain integers
are used for bit fields, together with #define. This pattern is not as
typesafe as using enums, still it is common practice.

In line 769, the expression !finite(f) is a legitimate use of a function
that has return type int for traditional reasons. It's the same as for
ferror.

There are several other functions like unlink, open or strcmp that have
return type int as well, but with a different meaning. It is not yet
clear what the best way is to handle these different meanings. Having
to write finite(f) == 0 in strict bool mode doesn't look idiomatic, on
the other hand, !strcmp(s1, s2) is exactly the pattern that strict bool
mode wants to avoid.
 1.5 23-Jan-2021  rillig lint: fix error message for relaxed bool operations in system headers

In strict mode, allowing 1 as bool constant expression is probably not
needed in practice since most comparisons are != 0 instead of == 0.

Furthermore, in the expression (flags & 0x0002) == true, comparing with
true is misleading since the '==' operator can never evaluate to true in
this case.
 1.4 23-Jan-2021  rillig lint: fix two wrong error messages in strict bool mode

The strict bool mode gets complicated because for system headers the
rules need to be relaxed since they cannot be changed easily, often not at all.

Still, if lint validates a program in strict bool mode, that program
must run with equal behavior regarding boolean expressions even on a
pre-C99 platform.
 1.3 23-Jan-2021  rillig lint: extend test for strict bool mode and system headers
 1.2 17-Jan-2021  rillig lint: allow system headers to use int as bool, even in strict bool mode
 1.1 17-Jan-2021  rillig lint: add more tests for system headers in strict bool mode
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_complex_num.c was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.13 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.12 05-Feb-2023  rillig tests/lint: clean up

The .exp files are no longer kept under version control, so there's no
reason anymore to forcefully trigger a warning or an error.
 1.11 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.10 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.9 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.8 11-Jul-2021  rillig tests/lint: test precedence of __real__ and cast_expression
 1.7 09-Apr-2021  rillig lint: fix wrong warning about uninitialized _Complex variable

Seen in divxc3.c.
 1.6 09-Apr-2021  rillig tests/lint: demonstrate wrong lint warning about complex variables
 1.5 27-Mar-2021  rillig tests/lint: move description of tests into the tests themselves

In most cases the descriptions didn't add much to the test name anyway.
 1.4 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 21-Apr-2014  christos branches: 1.2.2; 1.2.4; 1.2.8;
use a different function instead of __builtin_isnan, because it is polymorphic
and we don't handle this yet.
 1.1 17-Apr-2014  christos add more tests
 1.2.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 21-Apr-2014  tls file d_c99_complex_split.c was added on branch tls-maxphys on 2014-08-20 00:04:53 +0000
 1.2.4.2 10-Aug-2014  tls Rebase.
 1.2.4.1 21-Apr-2014  tls file d_c99_complex_split.c was added on branch tls-earlyentropy on 2014-08-10 06:57:37 +0000
 1.2.2.2 22-May-2014  yamt 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")
 1.2.2.1 21-Apr-2014  yamt file d_c99_complex_split.c was added on branch yamt-pagecache on 2014-05-22 11:42:24 +0000
 1.4 17-Jun-2022  rillig 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'.
 1.3 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.2 09-Apr-2021  rillig lint: fix wrong warning about uninitialized _Complex variable

Seen in divxc3.c.
 1.1 09-Apr-2021  rillig tests/lint: demonstrate wrong lint warning about complex variables
 1.4 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.3 20-Mar-2021  rillig lint: join grammar rules for initialization

The '%prec T_COMMA' is necessary to avoid lots of parse errors in the
lint1 unit tests. Curiously, further down in the grammar, for compound
literals, the '%prec T_COMMA' is not necessary, even though the context
looks very similar.

No functional change.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 11-May-2015  christos one t in literal.
 1.2 11-May-2015  christos one t in literal.
 1.1 11-May-2015  christos add one more test
 1.7 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.6 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.5 22-Jan-2023  rillig tests/lint: merge tests for declaration after statement
 1.4 12-Feb-2022  rillig tests/lint: document where some C99 tests come from

These tests were added due to PR#45417.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_decls_after_stmt.c was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.5 22-Jan-2023  rillig tests/lint: merge tests for declaration after statement
 1.4 12-Feb-2022  rillig tests/lint: document where some C99 tests come from

These tests were added due to PR#45417.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_decls_after_stmt2.c was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.5 22-Jan-2023  rillig tests/lint: merge tests for declaration after statement
 1.4 12-Feb-2022  rillig tests/lint: document where some C99 tests come from

These tests were added due to PR#45417.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 04-Feb-2014  njoly branches: 1.1.4; 1.1.8;
Handle another declaration after statement case for lint in c99 mode.
Add the corresponding testcase.
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 04-Feb-2014  tls file d_c99_decls_after_stmt3.c was added on branch tls-maxphys on 2014-08-20 00:04:53 +0000
 1.1.4.2 22-May-2014  yamt 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")
 1.1.4.1 04-Feb-2014  yamt file d_c99_decls_after_stmt3.c was added on branch yamt-pagecache on 2014-05-22 11:42:24 +0000
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 20-Nov-2014  christos test for c99 flexible packed arrays
 1.5 08-Jun-2024  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 26-Sep-2014  christos add a test for the bug I fixed yesterday, and explain the tests.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_for_loops.c was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.8 08-Jun-2024  rillig tests/lint: group tests by topic
 1.7 07-Jan-2024  rillig lint: fix crash for invalid __func__ (since 2023-01-29)
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 29-Jan-2023  rillig lint: fix definition of __func__
 1.4 29-Jan-2023  rillig lint: demonstrate wrong declaration of __func__
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_func.c was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.50 08-Jun-2024  rillig tests/lint: group tests by topic
 1.49 09-May-2024  rillig lint: add details to message about too many initializers
 1.48 30-Mar-2024  rillig lint: reword messages about array subscripts to sound more natural
 1.47 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.46 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.45 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.44 05-Feb-2023  rillig tests/lint: merge tests for initialization
 1.43 05-Feb-2023  rillig 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.
 1.42 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.41 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.40 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.39 28-Dec-2021  rillig tests/lint: extend documentation for omitted braces in initializer
 1.38 22-Dec-2021  rillig lint: remove spaces around bit-field colon

As seen in /usr/share/misc/style.

No binary change.
 1.37 22-Dec-2021  rillig tests/lint: improve test for initialization of array of unknown size

Previously, the test didn't show that the size of the resulting object
was updated too early.
 1.36 22-Dec-2021  rillig lint: fix handling of initializations

The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
 1.35 21-Dec-2021  rillig lint: make function names a bit more concise

No binary change.
 1.34 17-Dec-2021  rillig tests/lint: add more examples for initialization, from C99
 1.33 09-Apr-2021  rillig lint: fix initialization with brace-enclosed string literal

C99 allows this form in 6.7.8p14 and p15.

The previous lint tests did not cover the case of an array at the top
level of the object to be initialized, they only covered the error cases
(d_c99_init.c, variables 'prefixed_message' and 'message_with_suffix').

Lint is now more generous than strictly required by C99, but since GCC
and Clang already cover the case of 'message_with_suffix', this is ok.

The test d_init_array_using_string.c was wrong before in rejecting the
initializer for 'extra_braces'. I had tested that Clang generated a
warning for this, but I had not inspected its warning carefully enough.
Clang had not warned about the extra braces but only about a type
mismatch since I tested on a platform where wchar_t was 16 bit.
 1.32 09-Apr-2021  rillig tests/lint: demonstrate wrong warning when initializing a string
 1.31 02-Apr-2021  rillig lint: add parentheses after sizeof, as required by share/misc/style

No functional change.
 1.30 01-Apr-2021  rillig lint: do not error out of a struct is initialized without braces

This allows to process lib/libc/gen/sysctl.c 1.38 from 2021-03-30, as
well as its precedessor 1.37, which had a workaround just for lint.

While unusual, C99 allows these.
 1.29 30-Mar-2021  rillig tests/lint: test 'scalar type cannot use designator'
 1.28 30-Mar-2021  rillig tests/lint: remove unnecessary empty lines from test

In a separate commit to not cause an unnecessarily large diff in the
previous commit.
 1.27 30-Mar-2021  rillig lint: add error about out-of-bounds array subscripts

This check is not strictly necessary since any C99 compiler must
diagnose them as well, it is rather meant for demonstrating how to do
the check in lint, and for symmetry with the 'unknown member' error
message. These provide insight into how the data structures in init.c
are meant to be accessed.
 1.26 30-Mar-2021  rillig lint: add type information for message about unknown member name
 1.25 30-Mar-2021  rillig tests/lint: remove outdated comments
 1.24 30-Mar-2021  rillig lint: rewrite handling of initializations, fixing several bugs

The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.

The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.

The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.

Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.

The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.

The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
 1.23 29-Mar-2021  rillig tests/lint: demonstrate assertion failures for union initialization
 1.22 29-Mar-2021  rillig tests/lint: test unknown member name in struct

I had not expected to trigger another assertion, I just wanted to make
sure my latest ongoing refactoring will not break this case. Apparently
there is no need to worry about that.
 1.21 29-Mar-2021  rillig tests/lint: ensure initialization does not modify shared type

In my not yet published rewrite of lint's init.c, I forgot to copy the
array type. Guard against this bug, which would have been hard to find.

Given that in C, the declaration 'int a[], b[]' creates two different
type objects anyway, it's not easy to come up with a test case that
actually triggers this possible bug. I'm not sure whether this test
indeed catches this bug. If not, I'll add another test.
 1.20 29-Mar-2021  rillig tests/lint: add examples for initialization from C99

These all pass lint without any warnings. Both Clang and GCC warn about
these in -Wall mode, so they are unlikely to be seen in practice.
 1.19 28-Mar-2021  rillig lint: add test for assertion failure in initialization

The 'cnt = level->bl_type->t_tspec == STRUCT ? 2 : 1;' in
initialization_push_struct_or_union is obviously wrong since not every
struct has exactly 1 remaining member after the first member that has an
initializer with designation.

This bug started its life in init.c 1.12 from 2002-10-21, a little over
18 years ago.
 1.18 28-Mar-2021  rillig tests/lint: add tests for initialization
 1.17 28-Mar-2021  rillig 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.
 1.16 27-Mar-2021  rillig tests/lint: test initializing a struct ending with unnamed bit-field
 1.15 27-Mar-2021  rillig tests/lint: document expectations in test about array initialization
 1.14 27-Mar-2021  rillig tests/lint: trigger assertion failure in array initialization
 1.13 23-Mar-2021  rillig tests/lint: fix outdated comments
 1.12 20-Mar-2021  rillig tests/lint: add more tests for initialization, based on C99 6.7.8
 1.11 20-Mar-2021  rillig lint: fix assertion failure after error in designation

In d_c99_init.c, the initialization of array_with_designator failed.
The designator '.member' from that initialization was not cleaned up
before starting the next initialization.
 1.10 20-Mar-2021  rillig lint: replace segmentation fault with assertion failure
 1.9 19-Mar-2021  rillig lint: replace assertion in initialization with proper error message
 1.8 18-Mar-2021  rillig lint: replace undefined behavior during initialization with assertion

This only affects code that is already rejected by the compiler.
 1.7 18-Mar-2021  rillig tests/lint: add more examples for initialization
 1.6 21-Feb-2021  rillig lint: add debug logging for initializing an array of unknown size

It is possible that the type name 'array[unknown_size]' may spill into
the user-visible diagnostics. The current test suite does not cover
such a case. Anyway, saying 'array[unknown_size]' is still better than
saying 'array[0]', which would be misleading.
 1.5 21-Feb-2021  rillig lint: add test for initializing a character array using a string

The previous attempt took another code path than expected. The
initialization of static_duration actually calls initstack_string.
 1.4 21-Feb-2021  rillig lint: add more tests for C99 initialization
 1.3 21-Feb-2021  rillig lint: add another test case for initializing an object
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 21-Feb-2021  rillig lint: add another test for C99 initializers
 1.31 17-Jun-2022  rillig 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'.
 1.30 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.29 28-Dec-2021  rillig tests/lint: extend documentation for omitted braces in initializer
 1.28 22-Dec-2021  rillig lint: fix handling of initializations

The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
 1.27 17-Dec-2021  rillig tests/lint: add more examples for initialization, from C99
 1.26 09-Apr-2021  rillig lint: fix initialization with brace-enclosed string literal

C99 allows this form in 6.7.8p14 and p15.

The previous lint tests did not cover the case of an array at the top
level of the object to be initialized, they only covered the error cases
(d_c99_init.c, variables 'prefixed_message' and 'message_with_suffix').

Lint is now more generous than strictly required by C99, but since GCC
and Clang already cover the case of 'message_with_suffix', this is ok.

The test d_init_array_using_string.c was wrong before in rejecting the
initializer for 'extra_braces'. I had tested that Clang generated a
warning for this, but I had not inspected its warning carefully enough.
Clang had not warned about the extra braces but only about a type
mismatch since I tested on a platform where wchar_t was 16 bit.
 1.25 09-Apr-2021  rillig tests/lint: demonstrate wrong warning when initializing a string
 1.24 01-Apr-2021  rillig lint: do not error out of a struct is initialized without braces

This allows to process lib/libc/gen/sysctl.c 1.38 from 2021-03-30, as
well as its precedessor 1.37, which had a workaround just for lint.

While unusual, C99 allows these.
 1.23 30-Mar-2021  rillig tests/lint: test 'scalar type cannot use designator'
 1.22 30-Mar-2021  rillig tests/lint: remove unnecessary empty lines from test

In a separate commit to not cause an unnecessarily large diff in the
previous commit.
 1.21 30-Mar-2021  rillig lint: add error about out-of-bounds array subscripts

This check is not strictly necessary since any C99 compiler must
diagnose them as well, it is rather meant for demonstrating how to do
the check in lint, and for symmetry with the 'unknown member' error
message. These provide insight into how the data structures in init.c
are meant to be accessed.
 1.20 30-Mar-2021  rillig lint: add type information for message about unknown member name
 1.19 30-Mar-2021  rillig lint: reword message for very unlikely .member in array initialization
 1.18 30-Mar-2021  rillig tests/lint: remove outdated comments
 1.17 30-Mar-2021  rillig lint: rewrite handling of initializations, fixing several bugs

The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.

The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.

The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.

Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.

The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.

The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
 1.16 29-Mar-2021  rillig tests/lint: test unknown member name in struct

I had not expected to trigger another assertion, I just wanted to make
sure my latest ongoing refactoring will not break this case. Apparently
there is no need to worry about that.
 1.15 29-Mar-2021  rillig tests/lint: ensure initialization does not modify shared type

In my not yet published rewrite of lint's init.c, I forgot to copy the
array type. Guard against this bug, which would have been hard to find.

Given that in C, the declaration 'int a[], b[]' creates two different
type objects anyway, it's not easy to come up with a test case that
actually triggers this possible bug. I'm not sure whether this test
indeed catches this bug. If not, I'll add another test.
 1.14 28-Mar-2021  rillig tests/lint: add tests for initialization
 1.13 28-Mar-2021  rillig 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.
 1.12 27-Mar-2021  rillig tests/lint: test initializing a struct ending with unnamed bit-field
 1.11 23-Mar-2021  rillig tests/lint: fix outdated comments
 1.10 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.9 20-Mar-2021  rillig lint: fix assertion failure after error in designation

In d_c99_init.c, the initialization of array_with_designator failed.
The designator '.member' from that initialization was not cleaned up
before starting the next initialization.
 1.8 19-Mar-2021  rillig lint: replace assertion in initialization with proper error message
 1.7 18-Mar-2021  rillig lint: reword message about type mismatch in initialization

Using parentheses for quotes is unusual, furthermore the previous
message didn't follow proper grammar rules, sacrificing clarity for
brevity.
 1.6 18-Mar-2021  rillig tests/lint: add more examples for initialization
 1.5 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.4 21-Feb-2021  rillig lint: add test for initializing a character array using a string

The previous attempt took another code path than expected. The
initialization of static_duration actually calls initstack_string.
 1.3 21-Feb-2021  rillig lint: add more tests for C99 initialization
 1.2 21-Feb-2021  rillig lint: add another test case for initializing an object
 1.1 21-Feb-2021  rillig lint: add another test for C99 initializers
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 20-Feb-2021  rillig lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features. All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests. This will
be necessary for reworking the initializer code to actually conform to
C99.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 20-Nov-2014  christos Add one more test
 1.6 05-Feb-2023  rillig tests/lint: merge tests for initialization
 1.5 20-Feb-2021  rillig lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features. All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests. This will
be necessary for reworking the initializer code to actually conform to
C99.
 1.4 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_recursive_init.c was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.6 08-Jun-2024  rillig tests/lint: group tests by topic
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 20-Feb-2021  rillig lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features. All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests. This will
be necessary for reworking the initializer code to actually conform to
C99.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_struct_init.c was added on branch yamt-pagecache on 2012-04-17 00:09:22 +0000
 1.8 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.7 03-Aug-2021  rillig lint: union casts are only available as a GCC extension, not in C99
 1.6 03-Aug-2021  rillig tests/lint: prepare non-GCC test for union casts
 1.5 03-Aug-2021  rillig tests/lint: test GCC extension for casting to union type
 1.4 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 19-Aug-2016  christos branches: 1.1.2;
Add union cast test
 1.1.2.2 14-Sep-2016  pgoyette Sync with HEAD
 1.1.2.1 19-Aug-2016  pgoyette file d_c99_union_cast.c was added on branch pgoyette-localcount on 2016-09-14 03:04:19 +0000
 1.7 17-Jun-2022  rillig 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'.
 1.6 03-Aug-2021  rillig lint: union casts are only available as a GCC extension, not in C99
 1.5 03-Aug-2021  rillig tests/lint: prepare non-GCC test for union casts
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 28-Dec-2020  rillig lint1: add forgotten tests
 1.6 08-Jun-2024  rillig tests/lint: group tests by topic
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 20-Feb-2021  rillig lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features. All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests. This will
be necessary for reworking the initializer code to actually conform to
C99.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_union_init1.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.5 08-Jun-2024  rillig tests/lint: group tests by topic
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_union_init2.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.7 08-Jun-2024  rillig tests/lint: group tests by topic
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 20-Feb-2021  rillig lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features. All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests. This will
be necessary for reworking the initializer code to actually conform to
C99.
 1.4 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c99_union_init3.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.5 08-Jun-2024  rillig tests/lint: group tests by topic
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 28-Jul-2015  christos new c99 init test found by xorg's Iconify.c
 1.3 08-Jun-2024  rillig tests/lint: group tests by topic
 1.2 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.1 28-Feb-2021  rillig lint: add test to demonstrate that PR bin/20264 has been fixed
 1.5 08-Jun-2024  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 20-Feb-2021  rillig lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features. All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests. This will
be necessary for reworking the initializer code to actually conform to
C99.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c9x_array_init.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.5 05-Feb-2023  rillig 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.
 1.4 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.3 20-Feb-2021  rillig lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features. All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests. This will
be necessary for reworking the initializer code to actually conform to
C99.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_c9x_recursive_init.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.4 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.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 01-Jul-2015  christos new test.
 1.6 05-Feb-2023  rillig 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.
 1.5 03-Jul-2021  rillig tests/lint: fix test d_cast_init on macppc

On macppc, char == unsigned, which generated the following unintended
warnings:

d_cast_init.c(18): warning: initialization of unsigned with negative
constant [221]
d_cast_init.c(18): warning: initialization of unsigned with negative
constant [221]
d_cast_init.c(18): warning: initialization of unsigned with negative
constant [221]
d_cast_init.c(18): warning: initialization of unsigned with negative
constant [221]
 1.4 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_cast_init.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.4 05-Feb-2023  rillig 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.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_cast_init2.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.7 08-Jun-2024  rillig tests/lint: group tests by topic
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 04-Jul-2021  rillig lint: remove remaining support for lvalue casts

These had been GCC extensions until GCC 3.4, they were removed in GCC
4.0.
 1.4 27-Mar-2021  rillig tests/lint: move description of tests into the tests themselves

In most cases the descriptions didn't add much to the test name anyway.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_cast_lhs.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.2 17-Jun-2022  rillig 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'.
 1.1 04-Jul-2021  rillig lint: remove remaining support for lvalue casts

These had been GCC extensions until GCC 3.4, they were removed in GCC
4.0.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 06-Mar-2017  christos branches: 1.2.2; 1.2.4;
add builtin_offsetof
 1.1 06-Mar-2017  christos add a test for a typeof cast
 1.2.4.2 21-Apr-2017  bouyer Sync with HEAD
 1.2.4.1 06-Mar-2017  bouyer file d_cast_typeof.c was added on branch bouyer-socketcan on 2017-04-21 16:54:13 +0000
 1.2.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.2.2.1 06-Mar-2017  pgoyette file d_cast_typeof.c was added on branch pgoyette-localcount on 2017-03-20 06:58:02 +0000
 1.6 08-Jun-2024  rillig tests/lint: group tests by topic
 1.5 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.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_compound_literals1.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.6 08-Jun-2024  rillig tests/lint: group tests by topic
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_compound_literals2.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.7 08-Jun-2024  rillig tests/lint: group tests by topic
 1.6 08-Jun-2024  rillig lint: add details to warnings about negative constant to unsigned
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_constant_conv1.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.4 17-Jun-2022  rillig 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'.
 1.3 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.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.8 08-Jun-2024  rillig tests/lint: group tests by topic
 1.7 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.4 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.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_constant_conv2.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.8 17-Jun-2022  rillig 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'.
 1.7 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.6 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.5 04-Feb-2021  rillig lint: add back "due to prototype" to message 259

That message is only supposed to warn about compatibility to traditional
C, in case the function should ever be compiled without its prototype
being in effect. All other type checks are supposed to be in another
function, as documented, but that type check misses to report a few
error-prone type combinations (long to char, long to int).

30 years after the introduction of prototypes with C90, almost all
existing code uses prototypes. The warning has thus lost most of its
usefulness and can rather be confusing since a conversion from 'char' to
'long' is not problematic with prototypes in action, and the probability
of the code being backported to a pre-C90 compiler is diminishingly
small.

The words "due to prototype" now serve as a hint again. The proper fix
could be to suppress this warning in C99 mode since that's far enough
from traditional C.
 1.4 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.3 31-Jan-2021  rillig lint: reword message 259 about function argument conversion

The words "due to prototype" are an anachronism from the 1990s.
Nowadays every function is defined using a prototype, which makes these
words redundant.
 1.2 31-Jan-2021  rillig lint: make warning about function argument conversion more detailed

For every conversion it is useful to know both the source and the target
type since these are not always obvious from the code.

The only surprise is the warning in d_gcc_extension. The conversion
there is from 'double' to 'long double', which is a lossless conversion.
This may be a bug in lint.
 1.1 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.7 08-Jun-2024  rillig 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.
 1.6 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.5 21-Feb-2021  rillig lint: fix wrong warning about main falling off the bottom in C99 mode

This gets lint a small step closer to implementing C99.
 1.4 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Apr-2014  christos branches: 1.1.2; 1.1.4; 1.1.8;
add more tests
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 17-Apr-2014  tls file d_cvt_constant.c was added on branch tls-maxphys on 2014-08-20 00:04:53 +0000
 1.1.4.2 10-Aug-2014  tls Rebase.
 1.1.4.1 17-Apr-2014  tls file d_cvt_constant.c was added on branch tls-earlyentropy on 2014-08-10 06:57:37 +0000
 1.1.2.2 22-May-2014  yamt 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")
 1.1.2.1 17-Apr-2014  yamt file d_cvt_constant.c was added on branch yamt-pagecache on 2014-05-22 11:42:24 +0000
 1.7 17-Jun-2022  rillig 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'.
 1.6 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.5 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.4 21-Feb-2021  rillig lint: fix wrong warning about main falling off the bottom in C99 mode

This gets lint a small step closer to implementing C99.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 28-Dec-2020  rillig 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.
 1.4 08-Jun-2024  rillig 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.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_cvt_in_ternary.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.11 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.10 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.9 02-Aug-2023  rillig branches: 1.9.2;
lint: distinguish between arguments and parameters
 1.8 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 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.3 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 30-Dec-2020  rillig lint: add test for old style function arguments
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 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.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 30-Dec-2020  rillig lint: add test for old style function arguments
 1.6 08-Jun-2024  rillig 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.
 1.5 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.4 27-Mar-2021  rillig tests/lint: move description of tests into the tests themselves

In most cases the descriptions didn't add much to the test name anyway.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_ellipsis_in_switch.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.8 06-Aug-2023  rillig lint: since C99, a non-void function must return a value
 1.7 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.6 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.5 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.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 08-Jan-2021  rillig lint: fix function as controlling expression (since 2020-12-31)

It's perfectly valid to directly use a function name as the controlling
expression of an if statement. That function name is converted
implicitly to a pointer to that function, and that is a scalar value
then.

Spotted by christos in lib/libpthread/pthread.c:634.
 1.1 31-Dec-2020  rillig lint: check that in "if (cond)", cond is scalar
 1.7 17-Jun-2022  rillig 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'.
 1.6 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.5 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: fix function as controlling expression (since 2020-12-31)

It's perfectly valid to directly use a function name as the controlling
expression of an if statement. That function name is converted
implicitly to a pointer to that function, and that is a scalar value
then.

Spotted by christos in lib/libpthread/pthread.c:634.
 1.1 31-Dec-2020  rillig lint: check that in "if (cond)", cond is scalar
 1.14 02-Jul-2023  rillig lint: allow empty statements in GCC statement expressions
 1.13 02-Jul-2023  rillig tests/lint: demonstrate empty statement in GCC statement expression

Seen in external/mit/xorg/lib/dri.old.
 1.12 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.11 15-Jun-2022  rillig lint: clean up an empty line and the documentation

No functional change.
 1.10 31-May-2022  rillig lint: fix null pointer dereference after syntax error

Found by afl, starting with the malformed input '/**/f=({;/**/};}' that
no longer crashes. This input led to 'f=({L:;}', which is at least a
syntactically valid prefix of a translation unit, containing a GCC
statement expression with an unused label. The error message for this
unused label assumed that it would always be inside a function
definition.

While here, document incomplete recovery after syntax errors, in
msg_249.c.
 1.9 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.8 03-Apr-2022  rillig lint: fix crash after syntax error in GCC statement expression

Since cgram.y 1.226 from 2021-05-03.
 1.7 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.6 20-Jun-2021  rillig lint: fix crash on semantically wrong code in ({...})

Found by afl.
 1.5 19-Jun-2021  rillig lint: fix crash in malformed initialization
 1.4 27-Mar-2021  rillig tests/lint: move description of tests into the tests themselves

In most cases the descriptions didn't add much to the test name anyway.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_gcc_compound_statements1.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.6 17-Jun-2022  rillig 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'.
 1.5 31-May-2022  rillig lint: fix null pointer dereference after syntax error

Found by afl, starting with the malformed input '/**/f=({;/**/};}' that
no longer crashes. This input led to 'f=({L:;}', which is at least a
syntactically valid prefix of a translation unit, containing a GCC
statement expression with an unused label. The error message for this
unused label assumed that it would always be inside a function
definition.

While here, document incomplete recovery after syntax errors, in
msg_249.c.
 1.4 03-Apr-2022  rillig lint: fix crash after syntax error in GCC statement expression

Since cgram.y 1.226 from 2021-05-03.
 1.3 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.2 20-Jun-2021  rillig lint: fix crash on semantically wrong code in ({...})

Found by afl.
 1.1 19-Jun-2021  rillig lint: fix crash in malformed initialization
 1.6 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.5 26-Feb-2022  rillig lint: fix memory corruption in statement expressions (since 2021-12-17)

The commit that introduced the assertion failure looks innocent, it only
adds a few predefined functions for GCC mode. Nevertheless, before that
commit, lint consistently complained about 'error: void type illegal in
expression [109]', which doesn't make sense either.

This fix also removes the creative use of the initialization stack to
store the type of the statement expression. Having a separate stack for
these statement expressions makes the code easier to understand.
 1.4 10-Sep-2021  rillig lint: replace space followed by tab with simply tab

No functional change.
 1.3 23-Apr-2021  rillig tests/lint: test GCC compound expression without declaration
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_gcc_compound_statements2.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_gcc_compound_statements3.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.8 08-Jun-2024  rillig 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.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 25-May-2021  rillig 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.
 1.5 05-Apr-2021  rillig branches: 1.5.2;
tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.4 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Apr-2014  christos branches: 1.1.2; 1.1.4; 1.1.8;
add more tests
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 17-Apr-2014  tls file d_gcc_extension.c was added on branch tls-maxphys on 2014-08-20 00:04:53 +0000
 1.1.4.2 10-Aug-2014  tls Rebase.
 1.1.4.1 17-Apr-2014  tls file d_gcc_extension.c was added on branch tls-earlyentropy on 2014-08-10 06:57:37 +0000
 1.1.2.2 22-May-2014  yamt 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")
 1.1.2.1 17-Apr-2014  yamt file d_gcc_extension.c was added on branch yamt-pagecache on 2014-05-22 11:42:24 +0000
 1.5.2.1 31-May-2021  cjep sync with head
 1.7 25-May-2021  rillig 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.
 1.6 04-Feb-2021  rillig branches: 1.6.2;
lint: add back "due to prototype" to message 259

That message is only supposed to warn about compatibility to traditional
C, in case the function should ever be compiled without its prototype
being in effect. All other type checks are supposed to be in another
function, as documented, but that type check misses to report a few
error-prone type combinations (long to char, long to int).

30 years after the introduction of prototypes with C90, almost all
existing code uses prototypes. The warning has thus lost most of its
usefulness and can rather be confusing since a conversion from 'char' to
'long' is not problematic with prototypes in action, and the probability
of the code being backported to a pre-C90 compiler is diminishingly
small.

The words "due to prototype" now serve as a hint again. The proper fix
could be to suppress this warning in C99 mode since that's far enough
from traditional C.
 1.5 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.4 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.3 31-Jan-2021  rillig lint: reword message 259 about function argument conversion

The words "due to prototype" are an anachronism from the 1990s.
Nowadays every function is defined using a prototype, which makes these
words redundant.
 1.2 31-Jan-2021  rillig lint: make warning about function argument conversion more detailed

For every conversion it is useful to know both the source and the target
type since these are not always obvious from the code.

The only surprise is the warning in d_gcc_extension. The conversion
there is from 'double' to 'long double', which is a lossless conversion.
This may be a bug in lint.
 1.1 28-Dec-2020  rillig lint1: add forgotten tests
 1.6.2.1 31-May-2021  cjep sync with head
 1.5 08-Jun-2024  rillig 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.
 1.4 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.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_gcc_func.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.5 08-Jun-2024  rillig tests/lint: group tests by topic
 1.4 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.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_gcc_variable_array_init.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.5 08-Jun-2024  rillig 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.
 1.4 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.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_incorrect_array_size.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.5 17-Jun-2022  rillig 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'.
 1.4 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.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.15 08-Jun-2024  rillig tests/lint: group tests by topic
 1.14 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.13 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.12 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.11 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.10 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.9 22-Dec-2021  rillig tests/lint: fix space-tab indentation
 1.8 22-Dec-2021  rillig lint: fix handling of initializations

The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
 1.7 21-Dec-2021  rillig lint: reword message 187 about too long string literal for initializer

The previous message was imprecise in that it didn't distinguish between
non-terminating and terminating null bytes.
 1.6 10-Sep-2021  rillig lint: replace space followed by tab with simply tab

No functional change.
 1.5 14-Aug-2021  rillig lint: use standard quoting style for messages 124 and 184
 1.4 09-Apr-2021  rillig lint: fix initialization with brace-enclosed string literal

C99 allows this form in 6.7.8p14 and p15.

The previous lint tests did not cover the case of an array at the top
level of the object to be initialized, they only covered the error cases
(d_c99_init.c, variables 'prefixed_message' and 'message_with_suffix').

Lint is now more generous than strictly required by C99, but since GCC
and Clang already cover the case of 'message_with_suffix', this is ok.

The test d_init_array_using_string.c was wrong before in rejecting the
initializer for 'extra_braces'. I had tested that Clang generated a
warning for this, but I had not inspected its warning carefully enough.
Clang had not warned about the extra braces but only about a type
mismatch since I tested on a platform where wchar_t was 16 bit.
 1.3 30-Mar-2021  rillig lint: rewrite handling of initializations, fixing several bugs

The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.

The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.

The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.

Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.

The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.

The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
 1.2 23-Mar-2021  rillig lint: fix wrong warning about initialization using string literal

Missing braces after 'if', since init.c 1.68 from 2021-02-20.

GCC 10 doesn't complain about this even with -Wmisleading-indentation
since at least one of the involved lines is a macro invocation (in this
case both lines). GCC 11 will warn about this.

Clang warns about this, but the regular Clang build currently fails for
other reasons, so this problem didn't show up there either.
 1.1 23-Mar-2021  rillig 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.
 1.10 17-Jun-2022  rillig 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'.
 1.9 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.8 22-Dec-2021  rillig lint: fix handling of initializations

The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
 1.7 21-Dec-2021  rillig lint: reword message 187 about too long string literal for initializer

The previous message was imprecise in that it didn't distinguish between
non-terminating and terminating null bytes.
 1.6 14-Aug-2021  rillig lint: use standard quoting style for messages 124 and 184
 1.5 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.4 09-Apr-2021  rillig lint: fix initialization with brace-enclosed string literal

C99 allows this form in 6.7.8p14 and p15.

The previous lint tests did not cover the case of an array at the top
level of the object to be initialized, they only covered the error cases
(d_c99_init.c, variables 'prefixed_message' and 'message_with_suffix').

Lint is now more generous than strictly required by C99, but since GCC
and Clang already cover the case of 'message_with_suffix', this is ok.

The test d_init_array_using_string.c was wrong before in rejecting the
initializer for 'extra_braces'. I had tested that Clang generated a
warning for this, but I had not inspected its warning carefully enough.
Clang had not warned about the extra braces but only about a type
mismatch since I tested on a platform where wchar_t was 16 bit.
 1.3 30-Mar-2021  rillig lint: rewrite handling of initializations, fixing several bugs

The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.

The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.

The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.

Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.

The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.

The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
 1.2 23-Mar-2021  rillig lint: fix wrong warning about initialization using string literal

Missing braces after 'if', since init.c 1.68 from 2021-02-20.

GCC 10 doesn't complain about this even with -Wmisleading-indentation
since at least one of the involved lines is a macro invocation (in this
case both lines). GCC 11 will warn about this.

Clang warns about this, but the regular Clang build currently fails for
other reasons, so this problem didn't show up there either.
 1.1 23-Mar-2021  rillig 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.
 1.11 08-Jun-2024  rillig tests/lint: group tests by topic
 1.10 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.9 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.8 20-Jun-2021  rillig tests/lint: document disappearance of bug in pop_member
 1.7 30-Mar-2021  rillig lint: rewrite handling of initializations, fixing several bugs

The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.

The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.

The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.

Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.

The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.

The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
 1.6 19-Mar-2021  rillig tests/lint: add comma to struct initialization

This places the error marker one line up, where it is expected.
 1.5 20-Feb-2021  rillig lint: add machine-readable expectations to test for initializer
 1.4 20-Feb-2021  rillig lint: fix typo in test for pop_member

The leader of a city should rather be a mayor than a major.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 01-Jan-2021  rillig lint: fix wrong warning about bitfield in C99 structure initialization

The variable namemem is supposed to be a circular list, which is
"documented" implicitly in push_member.

The implementation was buggy though. In pop_member, the circular list
was destroyed though. Given the list (capital, major, favorite_color,
green), removing capital made major point to itself in the forward
direction, even though it should not have been modified at all.

In the test, I had been too optimistic to quickly understand the code
around variable initialization. I was wrong though, so I had to adjust
the comments there to reality.
 1.1 01-Jan-2021  rillig lint: demonstrate bug in handling of nested C9X struct initializers
 1.9 17-Jun-2022  rillig 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'.
 1.8 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.7 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.6 30-Mar-2021  rillig lint: rewrite handling of initializations, fixing several bugs

The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.

The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.

The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.

Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.

The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.

The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
 1.5 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.4 19-Mar-2021  rillig tests/lint: add comma to struct initialization

This places the error marker one line up, where it is expected.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 01-Jan-2021  rillig lint: fix wrong warning about bitfield in C99 structure initialization

The variable namemem is supposed to be a circular list, which is
"documented" implicitly in push_member.

The implementation was buggy though. In pop_member, the circular list
was destroyed though. Given the list (capital, major, favorite_color,
green), removing capital made major point to itself in the forward
direction, even though it should not have been modified at all.

In the test, I had been too optimistic to quickly understand the code
around variable initialization. I was wrong though, so I had to adjust
the comments there to reality.
 1.1 01-Jan-2021  rillig lint: demonstrate bug in handling of nested C9X struct initializers
 1.10 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.9 15-Jul-2023  rillig tests/lint: document how to reliably crash lint1 after a parse error
 1.8 15-Jul-2023  rillig lint: add debug logging for memory management and the symbol table
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.5 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.4 10-Jul-2021  rillig lint: fix assertion failure in declare_argument
 1.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 10-Jan-2021  rillig lint: fix assertion failure for syntax error in enum declaration
 1.1 10-Jan-2021  rillig lint: add test for triggering assertion failures in lint1
 1.6 17-Jun-2022  rillig 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'.
 1.5 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.4 10-Jul-2021  rillig lint: fix assertion failure in declare_argument
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 10-Jan-2021  rillig lint: fix assertion failure for syntax error in enum declaration
 1.1 10-Jan-2021  rillig lint: add test for triggering assertion failures in lint1
 1.7 08-Jun-2024  rillig 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.
 1.6 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.5 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.4 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 25-Jun-2020  jruoho Reference PRs consistently.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_long_double_int.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.7 17-Jun-2022  rillig 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'.
 1.6 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.5 14-Aug-2021  rillig lint: use standard quoting style for messages 124 and 184
 1.4 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.3 05-Jan-2021  rillig lint: clean up symbolic operator names that are used in the messages

Including the "p" in the symbolic operator names was questionable, for
several reasons:

1. The "p" could be taken to mean an actual variable name, which is
confusing if the function doesn't have such a variable, or even more
so if the line contains an unrelated variable called "p".

2. For the binary operators, having the "p" mentioned on both sides of
the operator (such as in "p + p") wrongly suggested that both
operands of the expression were the same.

3. The name "p" often stands for a pointer. Most of the operators
don't accept pointers, therefore the name was misleading.

For these reasons, the "p" was removed from the symbolic name of all
operators. This makes several pairs of operators indistinguishable:

INCBEF == INCAFT
DECBEF == DECAFT
UPLUS == PLUS
UMINUS == MINUS
STAR == MULT
AMPER == AND

This is not expected to create any confusion since C programmers are
expected to know these double meanings.

The symbolic names for SHLASS and SHRASS were missing the '=' before.
This was added since omitting it was probably an oversight.
 1.2 03-Jan-2021  rillig lint: add type information to message 124 "illegal pointer combination"
 1.1 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.5 08-Jun-2024  rillig tests/lint: group tests by topic
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_nested_structs.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.4 05-Feb-2023  rillig tests/lint: merge tests for initialization
 1.3 27-Mar-2021  rillig tests/lint: move description of tests into the tests themselves

In most cases the descriptions didn't add much to the test name anyway.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_nolimit_init.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.6 05-Aug-2023  rillig tests/lint: fix test for packed structs on 32-bit platforms
 1.5 01-Aug-2023  rillig tests/lint: test packed and in-parameter declarations
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_packed_structs.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.6 08-Jun-2024  rillig tests/lint: group tests by topic
 1.5 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.4 01-Apr-2022  rillig lint: improve determination of abstract typename

Still not perfect, but at least a step in the right direction. See
decl_direct_abstract.c for the missing edge cases.

See PR#22119.
 1.3 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.2 26-Mar-2021  rillig lint: add quotes around placeholder in message about undefined variable

Before: error: expected undefined [99]
After: error: 'expected' undefined [99]

Seen in external/mpl/bind, which for Clang defines in stdatomic.h:
> #define atomic_exchange_explicit(obj, desired, order) \
> __c11_atomic_exchange_explicit(obj, expected, order)
Note the mismatch between 'desired' and 'expected'.
 1.1 28-Feb-2021  rillig lint: fix null pointer dereference on parse error

Fixes PR bin/22119.
 1.6 17-Jun-2022  rillig 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'.
 1.5 01-Apr-2022  rillig lint: improve determination of abstract typename

Still not perfect, but at least a step in the right direction. See
decl_direct_abstract.c for the missing edge cases.

See PR#22119.
 1.4 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.3 26-Mar-2021  rillig lint: add quotes around placeholder in message about undefined variable

Before: error: expected undefined [99]
After: error: 'expected' undefined [99]

Seen in external/mpl/bind, which for Clang defines in stdatomic.h:
> #define atomic_exchange_explicit(obj, desired, order) \
> __c11_atomic_exchange_explicit(obj, expected, order)
Note the mismatch between 'desired' and 'expected'.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 28-Feb-2021  rillig lint: fix null pointer dereference on parse error

Fixes PR bin/22119.
 1.7 08-Jun-2024  rillig 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.
 1.6 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.5 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.4 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.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 01-Jan-2021  rillig lint: fix segmentation fault when checking returned enum types (211)
 1.4 17-Jun-2022  rillig 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'.
 1.3 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.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 01-Jan-2021  rillig lint: fix segmentation fault when checking returned enum types (211)
 1.4 29-Jan-2023  rillig tests/lint: merge tests for '>>'
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_shift_to_narrower_type.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.9 08-Jun-2024  rillig tests/lint: group tests by topic
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 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.6 25-Mar-2021  rillig lint: fix C99 initialization with expression of type 'struct'

This has been a long-standing limitation of lint. Now it is almost
ready for C99, see the list of "major changes" in the foreword of C99.

One known remaining bug in the area of initialization is designators
with several levels, such as '.member[2].member.member'. Oh, and
designators for arrays are only supported in the parser but not in the
type checker. There's still some work to do.
 1.5 18-Mar-2021  rillig tests/lint: warning 210 has type information by now
 1.4 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 30-Dec-2020  rillig lint: document purpose of the test d_struct_init_nested
 1.1 28-Dec-2020  rillig lint1: add test for initializing nested structs

Discovered in var.c 1.774 from 2020-12-28.
 1.10 17-Jun-2022  rillig 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'.
 1.9 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.8 25-Mar-2021  rillig lint: fix C99 initialization with expression of type 'struct'

This has been a long-standing limitation of lint. Now it is almost
ready for C99, see the list of "major changes" in the foreword of C99.

One known remaining bug in the area of initialization is designators
with several levels, such as '.member[2].member.member'. Oh, and
designators for arrays are only supported in the parser but not in the
type checker. There's still some work to do.
 1.7 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.6 18-Mar-2021  rillig lint: reword message about type mismatch in initialization

Using parentheses for quotes is unusual, furthermore the previous
message didn't follow proper grammar rules, sacrificing clarity for
brevity.
 1.5 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.4 21-Feb-2021  rillig lint: add type information to message about enum mismatch
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 30-Dec-2020  rillig lint: document purpose of the test d_struct_init_nested
 1.1 28-Dec-2020  rillig lint1: add expected output for test d_struct_init_nested
 1.8 08-Jun-2024  rillig tests/lint: group tests by topic
 1.7 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.4 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.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_type_conv1.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.8 17-Jun-2022  rillig 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'.
 1.7 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.6 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.5 04-Feb-2021  rillig lint: add back "due to prototype" to message 259

That message is only supposed to warn about compatibility to traditional
C, in case the function should ever be compiled without its prototype
being in effect. All other type checks are supposed to be in another
function, as documented, but that type check misses to report a few
error-prone type combinations (long to char, long to int).

30 years after the introduction of prototypes with C90, almost all
existing code uses prototypes. The warning has thus lost most of its
usefulness and can rather be confusing since a conversion from 'char' to
'long' is not problematic with prototypes in action, and the probability
of the code being backported to a pre-C90 compiler is diminishingly
small.

The words "due to prototype" now serve as a hint again. The proper fix
could be to suppress this warning in C99 mode since that's far enough
from traditional C.
 1.4 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.3 31-Jan-2021  rillig lint: reword message 259 about function argument conversion

The words "due to prototype" are an anachronism from the 1990s.
Nowadays every function is defined using a prototype, which makes these
words redundant.
 1.2 31-Jan-2021  rillig lint: make warning about function argument conversion more detailed

For every conversion it is useful to know both the source and the target
type since these are not always obvious from the code.

The only surprise is the warning in d_gcc_extension. The conversion
there is from 'double' to 'long double', which is a lossless conversion.
This may be a bug in lint.
 1.1 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.8 08-Jun-2024  rillig tests/lint: group tests by topic
 1.7 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.4 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.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_type_conv2.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.8 17-Jun-2022  rillig 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'.
 1.7 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.6 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.5 04-Feb-2021  rillig lint: add back "due to prototype" to message 259

That message is only supposed to warn about compatibility to traditional
C, in case the function should ever be compiled without its prototype
being in effect. All other type checks are supposed to be in another
function, as documented, but that type check misses to report a few
error-prone type combinations (long to char, long to int).

30 years after the introduction of prototypes with C90, almost all
existing code uses prototypes. The warning has thus lost most of its
usefulness and can rather be confusing since a conversion from 'char' to
'long' is not problematic with prototypes in action, and the probability
of the code being backported to a pre-C90 compiler is diminishingly
small.

The words "due to prototype" now serve as a hint again. The proper fix
could be to suppress this warning in C99 mode since that's far enough
from traditional C.
 1.4 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.3 31-Jan-2021  rillig lint: reword message 259 about function argument conversion

The words "due to prototype" are an anachronism from the 1990s.
Nowadays every function is defined using a prototype, which makes these
words redundant.
 1.2 31-Jan-2021  rillig lint: make warning about function argument conversion more detailed

For every conversion it is useful to know both the source and the target
type since these are not always obvious from the code.

The only surprise is the warning in d_gcc_extension. The conversion
there is from 'double' to 'long double', which is a lossless conversion.
This may be a bug in lint.
 1.1 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.9 08-Jun-2024  rillig tests/lint: group tests by topic
 1.8 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.5 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.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_type_conv3.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.8 17-Jun-2022  rillig 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'.
 1.7 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.6 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.5 04-Feb-2021  rillig lint: add back "due to prototype" to message 259

That message is only supposed to warn about compatibility to traditional
C, in case the function should ever be compiled without its prototype
being in effect. All other type checks are supposed to be in another
function, as documented, but that type check misses to report a few
error-prone type combinations (long to char, long to int).

30 years after the introduction of prototypes with C90, almost all
existing code uses prototypes. The warning has thus lost most of its
usefulness and can rather be confusing since a conversion from 'char' to
'long' is not problematic with prototypes in action, and the probability
of the code being backported to a pre-C90 compiler is diminishingly
small.

The words "due to prototype" now serve as a hint again. The proper fix
could be to suppress this warning in C99 mode since that's far enough
from traditional C.
 1.4 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.3 31-Jan-2021  rillig lint: reword message 259 about function argument conversion

The words "due to prototype" are an anachronism from the 1990s.
Nowadays every function is defined using a prototype, which makes these
words redundant.
 1.2 31-Jan-2021  rillig lint: make warning about function argument conversion more detailed

For every conversion it is useful to know both the source and the target
type since these are not always obvious from the code.

The only surprise is the warning in d_gcc_extension. The conversion
there is from 'double' to 'long double', which is a lossless conversion.
This may be a bug in lint.
 1.1 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.4 04-Jan-2023  rillig tests/lint: merge tests for ':?' with null pointer constant
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 29-Jul-2015  christos new test
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 03-Apr-2015  christos add test for typename as a function param
 1.3 08-Jun-2024  rillig 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.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_typename_as_var.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.4 08-Jun-2024  rillig 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.
 1.3 31-Jan-2021  rillig lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style. Therefore, format the tests to be readable
by following share/misc/style as close as possible.
 1.2 31-Jan-2021  rillig lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same. This is purely
conincidental. Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4. These 3 built-in lines are now replaced with 3
lines of file header.
 1.1 17-Mar-2012  jruoho branches: 1.1.2;
Deprecate tests/util.
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file d_zero_sized_arrays.c was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.36 14-Sep-2025  rillig lint: fix integer overflow in '<<' evaluation

Just in case that -ftrapv will someday cover '<<' as well, in addition
to the classic arithmetic operators.
 1.35 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.34 05-Mar-2025  rillig tests/lint: demonstrate missing warning about non-prototype
 1.33 30-Nov-2024  rillig tests/lint: add a few more tests to increase code coverage
 1.32 30-Nov-2024  rillig lint: add back optimization for non-query mode

The main point of the optimization is to skip the expensive calls to
type_name when preparing the message details. This was not spelled out
explicitly in the comment.

While here, fix the stray 'previous declaration' message that occurred
whenever a function was first declared as 'static' and later defined
without 'static', see query 16.
 1.31 08-Jun-2024  rillig branches: 1.31.2;
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.
 1.30 01-May-2024  rillig lint: make 'offsetof(t, array-member)' a constant expression

The macro 'offsetof(t, m)' already expanded to a constant expression for
scalar members but not for arrays. This was because the macro expanded
to '(size_t)(((t *)0)->m)', which lint internally represents as
'addr(indir(ptr(0) + offset(m)))', and build_address simplifies
'addr(indir(x))' to 'x' if the types match. The types only match for
scalar types though, but not for arrays.

When build_address happens, the type information is incomplete,
therefore 'offsetof(t, array)' has to be simplified at a later point.
 1.29 01-May-2024  rillig tests/lint: test large enum constants and offsetof with array members
 1.28 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.27 23-Jan-2024  rillig lint: rename symt_t to symbol_kind

It was confusing to have two kinds of "symbol type" (s_type and s_symt),
so rename all related identifiers to be more distinctive.

No functional change.
 1.26 01-Aug-2023  rillig tests/lint: test packed and in-parameter declarations
 1.25 31-Jul-2023  rillig tests/lint: test symbol lookup in unnamed bit-field member declaration
 1.24 31-Jul-2023  rillig lint: fix assertion failure after unnamed bit-field member

Since 2023-07-15.
 1.23 13-Jul-2023  rillig tests/lint: test duplicate type qualifiers in pointer types
 1.22 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.21 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.20 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.19 28-Aug-2022  rillig lint: rename dcs manipulation functions to be clearer

No functional change.
 1.18 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.17 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.16 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.15 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.14 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.13 03-Apr-2022  rillig lint: fix crash after syntax error in array declaration
 1.12 25-Jul-2021  rillig tests/lint: cover every code line in the grammar
 1.11 25-Jul-2021  rillig tests/lint: test parsing of type_name
 1.10 23-Jul-2021  rillig tests/lint: test lexer for the GCC extension __thread
 1.9 15-Jul-2021  rillig lint: extract dcs_merge_declaration_specifiers from end_type

No functional change.
 1.8 15-Jul-2021  rillig lint: fix internal error for sizeof(typeof)
 1.7 15-Jul-2021  rillig tests/lint: cover abstract_declaration, discover internal error
 1.6 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.5 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.4 11-Jul-2021  rillig lint: fix bug when parsing unused variable (since 2021-07-10)

Partially revert to cgram.y 1.248 from 2021-06-29.

This fixes the parse error for variables whose declaration starts with
__attribute__((unused)). In the many refactorings of the last days this
bug has slipped in, and since there were several refactorings in that
area, there may be have been further bugs that are not caught by the
current test suite. Revert for now and maybe apply them later again
when there are more tests.

Things kept from the current version are:

The names of most of the rules, as they correspond more closely to C99
and do not affect the behavior in any way.

In type_direct_decl, the replacement of type_attribute_list with
type_attribute since that nonterminal is already part of a repetition
(saves 4 conflicts).

In block_item, the order of the rules corresponds to C99. This has no
influence on the generated parser, except for the rule numbers, which
are informative.

The merge of the duplicate code for struct_tag, enum_tag and
enum_constant, as they all contained exactly the same code.
 1.3 11-Jul-2021  rillig tests/lint: parse error for unused variable (since 2021-07-10)

Since cgram.y 1.294 from 2021-07-10.
 1.2 10-Jul-2021  rillig tests/lint: test error handling in enum-specifier
 1.1 10-Jul-2021  rillig tests/lint: test declarations
 1.31.2.1 02-Aug-2025  perseant Sync with HEAD
 1.13 17-Jun-2022  rillig 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'.
 1.12 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.11 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.10 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.9 03-Apr-2022  rillig lint: fix crash after syntax error in array declaration
 1.8 25-Jul-2021  rillig tests/lint: cover every code line in the grammar
 1.7 25-Jul-2021  rillig tests/lint: test parsing of type_name
 1.6 23-Jul-2021  rillig tests/lint: test lexer for the GCC extension __thread
 1.5 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.4 11-Jul-2021  rillig lint: fix bug when parsing unused variable (since 2021-07-10)

Partially revert to cgram.y 1.248 from 2021-06-29.

This fixes the parse error for variables whose declaration starts with
__attribute__((unused)). In the many refactorings of the last days this
bug has slipped in, and since there were several refactorings in that
area, there may be have been further bugs that are not caught by the
current test suite. Revert for now and maybe apply them later again
when there are more tests.

Things kept from the current version are:

The names of most of the rules, as they correspond more closely to C99
and do not affect the behavior in any way.

In type_direct_decl, the replacement of type_attribute_list with
type_attribute since that nonterminal is already part of a repetition
(saves 4 conflicts).

In block_item, the order of the rules corresponds to C99. This has no
influence on the generated parser, except for the rule numbers, which
are informative.

The merge of the duplicate code for struct_tag, enum_tag and
enum_constant, as they all contained exactly the same code.
 1.3 11-Jul-2021  rillig tests/lint: parse error for unused variable (since 2021-07-10)

Since cgram.y 1.294 from 2021-07-10.
 1.2 10-Jul-2021  rillig tests/lint: test error handling in enum-specifier
 1.1 10-Jul-2021  rillig tests/lint: test declarations
 1.17 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.16 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.15 28-Sep-2024  rillig lint: handle __attribute__((__unused__)) for functions and variables

Previously, lint ignored the '__unused' marker, requiring its own /*
ARGSUSED */ marker instead.

Previously, attributes were interpreted as soon as the closing
parenthesis was parsed. For a function definition such as '__unused
static void f(void) {}', this was too early, as the attribute was not
connected to the function, as the function was not parsed yet.

Now, the 'unused' attribute is passed around by the parser, until it is
merged into the declarator where it belongs. Due to an inaccuracy in
the grammar, the 'used' attribute has to be passed through a
parameter_list, even though a parameter list is not related to
attributes. Still, it's better than before.
 1.14 28-Sep-2024  rillig lint: allow more than one __attribute__ on a parameter declaration
 1.13 28-Jan-2024  rillig branches: 1.13.2;
tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.12 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.11 02-Aug-2023  rillig lint: simplify handling of old-style arguments
 1.10 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.9 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.6 25-Jul-2021  rillig tests/lint: demonstrate internal error in parsing a declaration
 1.5 10-Jul-2021  rillig tests/lint: add more tests for covering the grammar
 1.4 10-Jul-2021  rillig tests/lint: add code coverage for grammar rule parameter_declaration
 1.3 10-Jul-2021  rillig lint: add code coverage for grammar rule direct_notype_param_decl
 1.2 10-Jul-2021  rillig tests/lint: move test for __attribute__ out of msg_124.c

That test case didn't belong there since there was no chance of getting
an 'illegal pointer combination' by applying an operator.
 1.1 09-Jul-2021  rillig 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.
 1.13.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 25-Jul-2021  rillig tests/lint: demonstrate internal error in parsing a declaration
 1.2 10-Jul-2021  rillig tests/lint: add code coverage for grammar rule parameter_declaration
 1.1 09-Jul-2021  rillig 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.
 1.12 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.11 22-Oct-2023  rillig tests/lint: test GCC attributes after abstract function type
 1.10 02-Aug-2023  rillig lint: fix handling of unnamed function parameters
 1.9 01-Jul-2023  rillig tests/lint: rework tests for type names
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 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.6 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.5 01-Apr-2022  rillig lint: improve determination of abstract typename

Still not perfect, but at least a step in the right direction. See
decl_direct_abstract.c for the missing edge cases.

See PR#22119.
 1.4 14-Sep-2021  rillig tests/lint: fix typo from previous commit
 1.3 14-Sep-2021  rillig lint: support int[*][3] from C99

No warning in pre-C99 mode since this declarator is not used in practice
anyway.
 1.2 14-Sep-2021  rillig tests/lint: test missing support for int[*][3]
 1.1 13-Sep-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.4 01-Apr-2022  rillig lint: improve determination of abstract typename

Still not perfect, but at least a step in the right direction. See
decl_direct_abstract.c for the missing edge cases.

See PR#22119.
 1.3 14-Sep-2021  rillig lint: support int[*][3] from C99

No warning in pre-C99 mode since this declarator is not used in practice
anyway.
 1.2 14-Sep-2021  rillig tests/lint: test missing support for int[*][3]
 1.1 13-Sep-2021  rillig 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.
 1.6 29-Oct-2024  rillig lint: add details to message about too large integer constant
 1.5 01-May-2024  rillig branches: 1.5.2;
tests/lint: test large enum constants and offsetof with array members
 1.4 30-Jun-2023  rillig lint: clean up names related to declaration levels

The previous prefix 'DK_' (declaration level kind) had a conflict with
the 'DK_' (designator kind) in init.c, so change the prefix to 'DLK_'.
The new name for dinfo_t is decl_level, which is more expressive.

No functional change.
 1.3 16-Apr-2022  rillig lint: in C99 mode, allow trailing comma in enum declarations

Adjust the test to be run in C90 mode instead of traditional mode, since
traditional C didn't have enums.
 1.2 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.1 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.1 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.3 11-Jul-2023  rillig lint: update wording in diagnostic for C99
 1.2 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.1 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.2 17-Jun-2022  rillig 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'.
 1.1 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.4 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.3 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.2 15-Jul-2021  rillig lint: remove message 66 about missing semicolon in struct-declaration
 1.1 15-Jul-2021  rillig tests/lint: test struct declarations
 1.5 17-Jun-2022  rillig 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'.
 1.4 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.3 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.2 15-Jul-2021  rillig lint: remove message 66 about missing semicolon in struct-declaration
 1.1 15-Jul-2021  rillig tests/lint: test struct declarations
 1.20 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.19 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.18 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.17 22-May-2023  rillig branches: 1.17.2;
lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.
 1.16 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.15 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.14 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.13 22-Dec-2021  rillig lint: remove spaces around bit-field colon

As seen in /usr/share/misc/style.

No binary change.
 1.12 05-Sep-2021  rillig tests/lint: document the fixed assertion failure for struct

The change to cgram.y 1.328 from 2021-07-15 didn't fix the crash on
purpose, it was merely a side effect. The grammar rule that probably
fixed this was that the error handling now skips to the next T_SEMI,
which it didn't do before.
 1.11 25-Aug-2021  rillig tests/lint: test conversion from long long to intptr_t on ilp32

Seen in usr.bin/make/var.c:1608.
 1.10 21-Jul-2021  rillig lint: rename grammar rules for specifier-qualifier-list

No functional change.
 1.9 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.8 15-Jul-2021  rillig lint: remove message 66 about missing semicolon in struct-declaration
 1.7 15-Jul-2021  rillig tests/lint: test struct declarations
 1.6 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.5 10-Jul-2021  rillig lint: fix parsing of __attribute__ for member (since 2021-07-10)

Since cgram.y 1.280 from 2021-07-10, lint could not parse struct members
that have multiple __attribute__ in front of their type.
 1.4 10-Jul-2021  rillig tests/lint: demonstrate parse error for __attribute__ member
 1.3 10-Jul-2021  rillig lint: rename clrtyp/deftyp to begin_type/end_type

The abbreviations clr/def did not make it obvious that these two
functions or grammar rules form pairs.

No functional change.
 1.2 20-Jun-2021  rillig lint: fix assertion failure on malformed struct declaration

Found using afl.
 1.1 19-Jun-2021  rillig lint: fix assertion failure in struct with unnamed member

Found using afl.
 1.17.2.1 02-Aug-2025  perseant Sync with HEAD
 1.12 17-Jun-2022  rillig 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'.
 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 05-Sep-2021  rillig tests/lint: document the fixed assertion failure for struct

The change to cgram.y 1.328 from 2021-07-15 didn't fix the crash on
purpose, it was merely a side effect. The grammar rule that probably
fixed this was that the error handling now skips to the next T_SEMI,
which it didn't do before.
 1.9 25-Aug-2021  rillig tests/lint: test conversion from long long to intptr_t on ilp32

Seen in usr.bin/make/var.c:1608.
 1.8 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.7 15-Jul-2021  rillig lint: remove message 66 about missing semicolon in struct-declaration
 1.6 15-Jul-2021  rillig tests/lint: test struct declarations
 1.5 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.4 10-Jul-2021  rillig lint: fix parsing of __attribute__ for member (since 2021-07-10)

Since cgram.y 1.280 from 2021-07-10, lint could not parse struct members
that have multiple __attribute__ in front of their type.
 1.3 10-Jul-2021  rillig tests/lint: demonstrate parse error for __attribute__ member
 1.2 20-Jun-2021  rillig lint: fix assertion failure on malformed struct declaration

Found using afl.
 1.1 19-Jun-2021  rillig lint: fix assertion failure in struct with unnamed member

Found using afl.
 1.18 09-Jun-2024  rillig tests/lint: demonstrate wrong result for nested function calls
 1.17 22-May-2023  rillig lint: fix emitted type for arrays of unknown size
 1.16 22-May-2023  rillig tests/lint: demonstrate wrong emitted array length in initialization

Seen in usr.bin/indent/debug.c, in the various 'name' arrays.
 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 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 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 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.11 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.10 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.9 28-Nov-2021  rillig tests/lint: update history of exporting unnamed objects
 1.8 28-Nov-2021  rillig tests/lint1: reproduce parse error for accidentally exported name

Seen in usr.sbin/cpuctl/aarch64.c line 118.

error: aarch64.ln:857:
not alnum or _: (for '118d-1.0d1200000000_tmpA16PcC')

The name 00000000_tmp was not supposed to be exported.
 1.7 10-Sep-2021  rillig lint: replace space followed by tab with simply tab

No functional change.
 1.6 04-Sep-2021  rillig tests/lint: test emitting format strings
 1.5 30-Aug-2021  rillig tests/lint: test writing and reading .ln files

The test case for reading varargs functions is no longer necessary, the
code is covered by the newly added tests as well.

Test inline function and return value usage.
 1.4 30-Aug-2021  rillig tests/lint: test varargs, printflike, scanflike
 1.3 28-Aug-2021  rillig tests/lint: demonstrate that GCC builtins are emitted by default

They will be skipped in a follow-up commit, but to see the effects of
that, they first need to be emitted.
 1.2 08-Aug-2021  rillig tests/lint: test passing of printf-like strings between lint1 and lint2
 1.1 18-Apr-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.2 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.1 18-Apr-2021  rillig 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.
 1.15 09-Jun-2024  rillig lint: fix usage marker for nested function calls
 1.14 09-Jun-2024  rillig tests/lint: demonstrate wrong result for nested function calls
 1.13 22-May-2023  rillig tests/lint1: allow whitespace in files containing the expected output

This reduces the amount of wizardry needed to interpret the files. For
a more gentle introduction of the file format, see ../lint2/msg_000.ln.

The whitespace that is removed is very similar to the one in the lint2
tests, the difference is that '%<space>' and '%#' need to be preserved
in abbreviated printf and scanf format strings.
 1.12 22-May-2023  rillig lint: fix emitted type for arrays of unknown size
 1.11 22-May-2023  rillig tests/lint: demonstrate wrong emitted array length in initialization

Seen in usr.bin/indent/debug.c, in the various 'name' arrays.
 1.10 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.9 28-Nov-2021  rillig lint: do not export unnamed objects to the .ln file

Since these objects are unnamed, they cannot be referenced by other
files or even create name clashes.

Seen in usr.sbin/cpuctl/aarch64.c, reported by Christos.
 1.8 28-Nov-2021  rillig tests/lint1: reproduce parse error for accidentally exported name

Seen in usr.sbin/cpuctl/aarch64.c line 118.

error: aarch64.ln:857:
not alnum or _: (for '118d-1.0d1200000000_tmpA16PcC')

The name 00000000_tmp was not supposed to be exported.
 1.7 04-Sep-2021  rillig tests/lint: test emitting format strings
 1.6 30-Aug-2021  rillig tests/lint: test writing and reading .ln files

The test case for reading varargs functions is no longer necessary, the
code is covered by the newly added tests as well.

Test inline function and return value usage.
 1.5 30-Aug-2021  rillig tests/lint: test varargs, printflike, scanflike
 1.4 28-Aug-2021  rillig lint: do not emit GCC builtin functions

Lint1 no longer emits declarations of GCC builtin functions and calls to
them.

Previously, lint generated 3421 useless warnings in a default NetBSD
build, like this:

__atomic_load_n, arg 1 used inconsistently
acl.c(216)[pointer to unsigned int]
rbtdb.c(921)[pointer to unsigned short]

This was because lint just doesn't understand that these functions are
type-generic, which is indeed unusual in C.

These useless warnings made the lint output more frightening than it
should actually be. Together with the strange formatting of the
diagnostics (space-space-tab after the main message, two spaces and two
colons between the occurrences, symbols are listed in hashcode order),
this creates the impression that lint is not intended to be a
user-friendly tool.

For now, fix the excess warnings, leaving the other items for later.
 1.3 28-Aug-2021  rillig tests/lint: demonstrate that GCC builtins are emitted by default

They will be skipped in a follow-up commit, but to see the effects of
that, they first need to be emitted.
 1.2 08-Aug-2021  rillig tests/lint: test passing of printf-like strings between lint1 and lint2
 1.1 27-Jun-2021  rillig tests/lint: rename expected .ln file to .exp-ln

This way, the hack for suffixes is no longer needed.
 1.4 27-Jun-2021  rillig tests/lint: rename expected .ln file to .exp-ln

This way, the hack for suffixes is no longer needed.
 1.3 21-Apr-2021  christos Put things back, emit.ln it was meant to be there.
 1.2 21-Apr-2021  christos remove emit.ln; looks like an accident and breaks the build.
 1.1 18-Apr-2021  rillig 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.
 1.2 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.1 05-Aug-2021  rillig tests/lint: test emitting 128-bit integer types for lint2
 1.2 22-May-2023  rillig tests/lint1: allow whitespace in files containing the expected output

This reduces the amount of wizardry needed to interpret the files. For
a more gentle introduction of the file format, see ../lint2/msg_000.ln.

The whitespace that is removed is very similar to the one in the lint2
tests, the difference is that '%<space>' and '%#' need to be preserved
in abbreviated printf and scanf format strings.
 1.1 05-Aug-2021  rillig tests/lint: test emitting 128-bit integer types for lint2
 1.1 08-Jun-2024  rillig 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.
 1.10 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.9 27-Feb-2025  rillig tests/lint: spell out the type combinations for the '?:' operator
 1.8 14-Jul-2023  rillig branches: 1.8.2;
lint: clean up comments, add a test for the '?:' operator
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 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.5 01-Aug-2021  rillig tests/lint: re-add the test for __uint128_t
 1.4 01-Aug-2021  rillig tests/lint: fully cover the usual arithmetic conversions
 1.3 01-Aug-2021  rillig lint: fix usual arithmetic conversions for 128-bit integer types
 1.2 01-Aug-2021  rillig lint: demonstrate wrong integer conversion for __uint128_t
 1.1 01-Aug-2021  rillig tests/lint: test the usual arithmetic conversions

The function 'balance' does not mention __uint128_t and nevertheless
works as expected. Need to investigate further.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 01-Aug-2021  rillig tests/lint: re-add the test for __uint128_t
 1.4 01-Aug-2021  rillig tests/lint: fully cover the usual arithmetic conversions
 1.3 01-Aug-2021  rillig lint: fix usual arithmetic conversions for 128-bit integer types
 1.2 01-Aug-2021  rillig lint: demonstrate wrong integer conversion for __uint128_t
 1.1 01-Aug-2021  rillig tests/lint: test the usual arithmetic conversions

The function 'balance' does not mention __uint128_t and nevertheless
works as expected. Need to investigate further.
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 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.1 01-Aug-2021  rillig tests/lint: test the usual arithmetic conversions in traditional C
 1.2 17-Jun-2022  rillig 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'.
 1.1 01-Aug-2021  rillig tests/lint: test the usual arithmetic conversions in traditional C
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 08-Jun-2024  rillig branches: 1.6.2;
tests/lint: group tests by topic
 1.5 06-Aug-2023  rillig lint: since C99, a non-void function must return a value
 1.4 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.3 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.2 03-Aug-2021  rillig lint: casting to a struct is not allowed in C99, only with GCC
 1.1 03-Aug-2021  rillig tests/lint: test casting a struct to another struct
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.2 03-Aug-2021  rillig lint: casting to a struct is not allowed in C99, only with GCC
 1.1 03-Aug-2021  rillig tests/lint: test casting a struct to another struct
 1.17 10-Apr-2025  rillig lint: remove now-unnecessary CONSTCOND comments
 1.16 08-Jun-2024  rillig branches: 1.16.2;
lint: add details to warnings about negative constant to unsigned
 1.15 10-Mar-2024  rillig lint: add details to the message about integer overflow

Having only the operator was too unspecific to be actionable, so add the
actual numbers and the data type.
 1.14 10-Mar-2024  rillig lint: detect more cases of integer overflow in constant expressions

For unsigned integers, detect when 'a + b' wraps around.
 1.13 10-Mar-2024  rillig lint: remove wrong warning about overflow in unary '-' for unsigned
 1.12 09-Mar-2024  rillig lint: fix excessive overflow warning after division by zero
 1.11 06-Jan-2024  rillig lint: remove redundant parentheses, braces and comments

Rename the functions for folding constant expressions, to make the
comments redundant.
 1.10 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.9 02-Jul-2023  rillig lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 19-Apr-2022  rillig lint: fix integer overflow on seeing -(uint64_t)INT64_MIN

Seen in external/cddl/osnet/dist/lib/libuutil/common/uu_strtoint.c,
which is protected by a NOLINT in ../Makefile.inc.
 1.6 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.5 23-Aug-2021  rillig lint: add quotes around placeholder in message 141
 1.4 22-Aug-2021  rillig lint: fix folding of comparisons in constant expressions
 1.3 22-Aug-2021  rillig tests/lint: demonstrate wrong folding of 64-bit numbers
 1.2 19-Aug-2021  rillig lint: fix wrong integer overflow warning for unsigned types
 1.1 19-Aug-2021  rillig 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.
 1.16.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 17-Jun-2022  rillig 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'.
 1.7 19-Apr-2022  rillig lint: fix integer overflow on seeing -(uint64_t)INT64_MIN

Seen in external/cddl/osnet/dist/lib/libuutil/common/uu_strtoint.c,
which is protected by a NOLINT in ../Makefile.inc.
 1.6 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.5 23-Aug-2021  rillig lint: add quotes around placeholder in message 141
 1.4 22-Aug-2021  rillig lint: fix folding of comparisons in constant expressions
 1.3 22-Aug-2021  rillig tests/lint: demonstrate wrong folding of 64-bit numbers
 1.2 19-Aug-2021  rillig lint: fix wrong integer overflow warning for unsigned types
 1.1 19-Aug-2021  rillig 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.
 1.4 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.3 08-Jun-2024  rillig branches: 1.3.2;
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.
 1.2 22-Aug-2021  rillig lint: fix folding of comparisons in constant expressions
 1.1 22-Aug-2021  rillig tests/lint: demonstrate wrong constant folding in strict bool mode

Found while investigating wrong constant folding in default mode.
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 22-Aug-2021  rillig lint: fix folding of comparisons in constant expressions
 1.1 22-Aug-2021  rillig tests/lint: demonstrate wrong constant folding in strict bool mode

Found while investigating wrong constant folding in default mode.
 1.12 01-May-2024  rillig lint: support _Alignas and __attribute__((__aligned(4)))
 1.11 28-Mar-2023  rillig lint: warn about extern declarations outside headers

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

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

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

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

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

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

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

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

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

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

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

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

No noticeable change in practice since these cases are already handled
by the compilers.
 1.1 15-Jul-2021  rillig tests/lint: test precedence of operators
 1.8 17-Jun-2022  rillig 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'.
 1.7 26-Jul-2021  rillig lint: fix parse error in conditional expression (since 2021-07-15)
 1.6 26-Jul-2021  rillig tests/lint: show bug in conditional expression (since 2021-07-15)

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

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

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

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

No noticeable change in practice since these cases are already handled
by the compilers.
 1.1 15-Jul-2021  rillig tests/lint: test precedence of operators
 1.5 05-Nov-2024  rillig lint: fix cross references in comments
 1.4 28-Mar-2023  rillig branches: 1.4.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 04-Jan-2023  rillig tests/lint: document where to find the test results for promotions
 1.2 16-Aug-2021  rillig tests/lint: test default argument promotion with enum
 1.1 16-Aug-2021  rillig tests/lint: test arithmetic promotions and enums
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 30-Dec-2023  rillig tests/lint: add spaces to expected files, for better readability
 1.3 04-Jan-2023  rillig tests/lint: document where to find the test results for promotions
 1.2 16-Aug-2021  rillig tests/lint: test default argument promotion with enum
 1.1 16-Aug-2021  rillig tests/lint: test arithmetic promotions and enums
 1.6 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.5 05-Nov-2024  rillig lint: fix cross references in comments
 1.4 28-Mar-2023  rillig branches: 1.4.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 04-Jan-2023  rillig tests/lint: document where to find the test results for promotions
 1.2 16-Aug-2021  rillig tests/lint: test default argument promotion with enum
 1.1 16-Aug-2021  rillig tests/lint: test arithmetic promotions and enums
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 30-Dec-2023  rillig tests/lint: add spaces to expected files, for better readability
 1.3 04-Jan-2023  rillig tests/lint: document where to find the test results for promotions
 1.2 16-Aug-2021  rillig tests/lint: test default argument promotion with enum
 1.1 16-Aug-2021  rillig tests/lint: test arithmetic promotions and enums
 1.6 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 05-Jul-2021  rillig tests/lint: fix typos in comment in expr_range
 1.2 15-May-2021  rillig branches: 1.2.2;
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.
 1.1 14-May-2021  rillig tests/lint: test bitwise mismatch in switch statement
 1.2.2.2 31-May-2021  cjep sync with head
 1.2.2.1 15-May-2021  cjep file expr_range.c was added on branch cjep_staticlib_x on 2021-05-31 22:15:24 +0000
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 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.1 16-May-2021  rillig branches: 1.1.2;
tests/lint: add expected output for testing '&' in switch statement
 1.1.2.2 31-May-2021  cjep sync with head
 1.1.2.1 16-May-2021  cjep file expr_range.exp was added on branch cjep_staticlib_x on 2021-05-31 22:15:24 +0000
 1.19 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.18 03-May-2024  rillig branches: 1.18.2;
tests/lint: fix supposedly platform-independent type definitions

No idea where I got the previous type definitions from. The typedef
names looked just too convincing to actually check the underlying types.
 1.17 03-May-2024  rillig tests/lint: skip test for sizeof struct on 32-bit platforms

Even though the test only uses fixed-size types, lint's computed size of
the resulting struct differs between i386 (80) and x86_64 (112). Both
are wrong, probably due to the unrelated struct declaration above, as
already mentioned in the comments.
 1.16 02-May-2024  rillig tests/lint: demonstrate wrong struct size calculation
 1.15 13-Mar-2024  rillig tests/lint: ensure that lint correctly decays array parameter types
 1.14 05-Aug-2023  rillig lint: implement __builtin_offsetof for the simplest cases

Cases not covered:
1. C99 allows designators in the offsetof macro.
2. For packed types, the offset is likely to be incorrect.
 1.13 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.12 30-Jun-2023  rillig lint: fix handling of unnamed struct/union members

The support for unnamed struct/union members that was added in decl.c
1.60 from 2015-10-13 was simple but wrong. It didn't cover initializers
of these structures and computed wrong sizes for structures containing
anonymous unions. At that time, the handling of initializers was broken
as well, it was fixed 6 years later in init.c 1.229 from 2021-12-22.

Real-life examples for code that lint couldn't handle are:

* external/bsd/jemalloc/dist/src/jemalloc.c
* external/mit/xorg/lib/dri.old/Makefile
 1.11 30-Jun-2023  rillig tests/lint: extend tests for sizeof and alignof
 1.10 30-Jun-2023  rillig lint: fix computation of bit-field width

When bit-fields in packed structs were added on 2009-10-02, lint assumed
that they would only use 'signed int' or 'unsigned int' as storage unit,
even though C99 also allows _Bool.

The cleanup commit for decl.c 1.225 from 2021-08-28 accidentally changed
the rounding mode for bit-field storage units from round-up to
round-down.
 1.9 30-Jun-2023  rillig tests/lint: add more tests for sizeof, offsetof, alignof
 1.8 30-Jun-2023  rillig tests/lint: extend test for sizeof and offsetof
 1.7 30-Jun-2023  rillig tests/lint: demonstrate bugs in anonymous struct/union handling
 1.6 28-Jun-2023  rillig tests/lint: demonstrate wrong size calculation in anonymous union
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jan-2023  rillig tests/lint: fix typo in comment
 1.3 15-Jan-2023  rillig tests/lint: fix test for sizeof with variable-length array
 1.2 15-Jan-2023  rillig tests/lint: add more tests for sizeof
 1.1 15-Jan-2023  rillig tests/lint: add test for parsing sizeof expressions
 1.18.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 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.2 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.1 08-Apr-2021  rillig 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.
 1.3 17-Jun-2022  rillig 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'.
 1.2 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.1 08-Apr-2021  rillig 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.
 1.6 31-Jul-2025  rillig lint: fix return type of GCC's __atomic functions
 1.5 31-Jul-2025  rillig tests/lint: demonstrate wrong warning in GCC __atomic functions

Seen in GCC's libbacktrace, dwarf.c:3732.
 1.4 29-Aug-2024  rillig lint: support GCC's __auto_type

Fixes PR toolchain/58654.
 1.3 08-Jun-2024  rillig branches: 1.3.2;
tests/lint: group tests by topic
 1.2 08-Jun-2024  rillig lint: fix type of GCC-specific __FUNCTION__ to be an array
 1.1 08-Jun-2024  rillig 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.
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.13 28-Mar-2023  rillig lint: warn about extern declarations outside headers

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

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

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

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

ok christos@.
 1.11 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.10 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.9 09-Jul-2021  rillig tests/lint: ensure that GCC __attribute__ can be parsed
 1.8 06-Jul-2021  rillig tests/lint: add test for empty __attribute__(())
 1.7 06-Jul-2021  rillig 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.
 1.6 06-Jul-2021  rillig tests/lint: document wrong handling of GCC __attribute__
 1.5 03-May-2021  rillig lint: allow variables to be named 'pcs'
 1.4 03-May-2021  rillig tests/lint: demonstrate bug in the lexer for GCC attributes
 1.3 01-May-2021  rillig tests/lint: add test for __attribute__((nonnull()))
 1.2 01-May-2021  rillig lint: support all documented variants of __attribute__((nonnull))
 1.1 30-Apr-2021  rillig tests/lint: add very basic tests for GCC __attribute__
 1.8 17-Jun-2022  rillig 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'.
 1.7 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.6 06-Jul-2021  rillig 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.
 1.5 03-May-2021  rillig lint: allow variables to be named 'pcs'
 1.4 03-May-2021  rillig tests/lint: demonstrate bug in the lexer for GCC attributes
 1.3 01-May-2021  rillig tests/lint: add test for __attribute__((nonnull()))
 1.2 01-May-2021  rillig lint: support all documented variants of __attribute__((nonnull))
 1.1 30-Apr-2021  rillig tests/lint: add very basic tests for GCC __attribute__
 1.8 01-May-2024  rillig lint: fix size of struct with large alignment

Lint now successfully passes all compile-time assertions in the amd64
kernel that deal with struct sizes.
 1.7 01-May-2024  rillig lint: support _Alignas and __attribute__((__aligned(4)))
 1.6 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.5 27-Aug-2022  rillig tests/lint: add more information to test for __attribute__((aligned))

Declaring an array type having a negative dimension is the simplest way
to embed an integer into a lint diagnostic, thereby revealing what size
and alignment lint has calculated for a struct.

While here, move these "compile-time assertions" closer to their
corresponding struct, to make reading easier.
 1.4 27-Aug-2022  rillig tests/lint: add another test for aligned struct member

In the kernel, several structs have this attribute, and running lint on
them runs into a compile-time assertion. Typical error messages are:

* error: illegal bit-field size: 255 [36]
* error: integral constant expression expected [55]
 1.3 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.2 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.1 02-May-2021  rillig tests/lint: demonstrate missing support for __packed __aligned
 1.3 17-Jun-2022  rillig 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'.
 1.2 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.1 02-May-2021  rillig tests/lint: demonstrate missing support for __packed __aligned
 1.6 16-May-2025  rillig tests/lint: test multiple attributes on enums, functions and labels

The grammar rule 'gcc_attribute_specifier_list:
gcc_attribute_specifier_list gcc_attribute_specifier' was not covered
before.
 1.5 17-Jun-2022  rillig branches: 1.5.4;
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.4 25-Jul-2021  rillig lint: fix parsing of enumerators with __attribute__
 1.3 25-Jul-2021  rillig lint: fix parsing of __attribute__ before enum tag

The __attribute__ after the enumerators will be fixed in a follow-up
commit since lint exits after the 5th syntax error in a translation
unit, which up to now shadowed the error messages about the enumerators.
 1.2 25-Jul-2021  rillig tests/lint: test __attribute__ with enum
 1.1 06-Jul-2021  rillig 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.
 1.5.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 25-Jul-2021  rillig lint: fix parsing of enumerators with __attribute__
 1.3 25-Jul-2021  rillig lint: fix parsing of __attribute__ before enum tag

The __attribute__ after the enumerators will be fixed in a follow-up
commit since lint exits after the 5th syntax error in a translation
unit, which up to now shadowed the error messages about the enumerators.
 1.2 25-Jul-2021  rillig tests/lint: test __attribute__ with enum
 1.1 06-Jul-2021  rillig 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.
 1.6 16-May-2025  rillig tests/lint: test multiple attributes on enums, functions and labels

The grammar rule 'gcc_attribute_specifier_list:
gcc_attribute_specifier_list gcc_attribute_specifier' was not covered
before.
 1.5 13-Nov-2024  rillig lint: handle _Noreturn, [[noreturn]] and __attribute__((__noreturn__))
 1.4 28-Mar-2023  rillig branches: 1.4.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.2 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.1 06-Jul-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.2 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.1 06-Jul-2021  rillig 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.
 1.5 16-May-2025  rillig tests/lint: test multiple attributes on enums, functions and labels

The grammar rule 'gcc_attribute_specifier_list:
gcc_attribute_specifier_list gcc_attribute_specifier' was not covered
before.
 1.4 28-Mar-2023  rillig branches: 1.4.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 28-Apr-2022  rillig 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.
 1.2 11-Jul-2021  rillig lint: support __attribute__((hot))

The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.
 1.1 06-Jul-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 28-Apr-2022  rillig 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.
 1.2 11-Jul-2021  rillig lint: support __attribute__((hot))

The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.
 1.1 06-Jul-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 28-Apr-2022  rillig 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.
 1.2 28-Apr-2022  rillig tests/lint: add test for GCC unused statement

Seen in xsrc/LRGB.c:799.

Even though it looks like this lint error may have been introduced by
cgram.y 1.400 from 2022-04-24 (since LRGB.c has been unchanged for a
month), earlier versions of lint produce the same parse errors.
 1.1 06-Jul-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 28-Apr-2022  rillig 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.
 1.2 28-Apr-2022  rillig tests/lint: add test for GCC unused statement

Seen in xsrc/LRGB.c:799.

Even though it looks like this lint error may have been introduced by
cgram.y 1.400 from 2022-04-24 (since LRGB.c has been unchanged for a
month), earlier versions of lint produce the same parse errors.
 1.1 06-Jul-2021  rillig 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.
 1.4 05-Feb-2023  rillig tests/lint: clean up

The .exp files are no longer kept under version control, so there's no
reason anymore to forcefully trigger a warning or an error.
 1.3 25-Aug-2022  rillig lint: remove explicit list of known GCC attributes

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

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

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

ok christos@.
 1.2 25-Jul-2021  rillig lint: reorder grammar rules

First the base cases, then the extensions, like in most other rules in
this file.

No functional change.
 1.1 06-Jul-2021  rillig 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.
 1.3 17-Jun-2022  rillig 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'.
 1.2 25-Jul-2021  rillig lint: reorder grammar rules

First the base cases, then the extensions, like in most other rules in
this file.

No functional change.
 1.1 06-Jul-2021  rillig 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.
 1.13 28-Sep-2024  rillig lint: handle __attribute__((__unused__)) for functions and variables

Previously, lint ignored the '__unused' marker, requiring its own /*
ARGSUSED */ marker instead.

Previously, attributes were interpreted as soon as the closing
parenthesis was parsed. For a function definition such as '__unused
static void f(void) {}', this was too early, as the attribute was not
connected to the function, as the function was not parsed yet.

Now, the 'unused' attribute is passed around by the parser, until it is
merged into the declarator where it belongs. Due to an inaccuracy in
the grammar, the 'used' attribute has to be passed through a
parameter_list, even though a parameter list is not related to
attributes. Still, it's better than before.
 1.12 28-Sep-2024  rillig lint: reduce shift/reduce conflicts in grammar

In an anonymous member declaration, the type attributes are already
parsed by the type specifier.
 1.11 15-Jul-2023  rillig branches: 1.11.2;
lint: each member declarator may have attributes, not only the last one
 1.10 15-Jul-2023  rillig tests/lint: test GCC attributes in member declarations
 1.9 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 05-Feb-2023  rillig tests/lint: clean up

The .exp files are no longer kept under version control, so there's no
reason anymore to forcefully trigger a warning or an error.
 1.6 25-Aug-2022  rillig lint: remove explicit list of known GCC attributes

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

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

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

ok christos@.
 1.5 11-Aug-2021  rillig lint: allow GCC __attribute__ after array brackets

GCC accepts this, so should lint. Seen in pam_lastlog.c:115.
 1.4 11-Aug-2021  rillig tests/lint: demonstrate wrong 'syntax error' for unused argument

Seen in pam_chroot.c:60.
 1.3 11-Jul-2021  rillig lint: fix bug when parsing unused variable (since 2021-07-10)

Partially revert to cgram.y 1.248 from 2021-06-29.

This fixes the parse error for variables whose declaration starts with
__attribute__((unused)). In the many refactorings of the last days this
bug has slipped in, and since there were several refactorings in that
area, there may be have been further bugs that are not caught by the
current test suite. Revert for now and maybe apply them later again
when there are more tests.

Things kept from the current version are:

The names of most of the rules, as they correspond more closely to C99
and do not affect the behavior in any way.

In type_direct_decl, the replacement of type_attribute_list with
type_attribute since that nonterminal is already part of a repetition
(saves 4 conflicts).

In block_item, the order of the rules corresponds to C99. This has no
influence on the generated parser, except for the rule numbers, which
are informative.

The merge of the duplicate code for struct_tag, enum_tag and
enum_constant, as they all contained exactly the same code.
 1.2 11-Jul-2021  rillig tests/lint: analyze yesterday's bug for parsing declarations
 1.1 06-Jul-2021  rillig 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.
 1.11.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 11-Aug-2021  rillig lint: allow GCC __attribute__ after array brackets

GCC accepts this, so should lint. Seen in pam_lastlog.c:115.
 1.4 11-Aug-2021  rillig tests/lint: demonstrate wrong 'syntax error' for unused argument

Seen in pam_chroot.c:60.
 1.3 11-Jul-2021  rillig lint: fix bug when parsing unused variable (since 2021-07-10)

Partially revert to cgram.y 1.248 from 2021-06-29.

This fixes the parse error for variables whose declaration starts with
__attribute__((unused)). In the many refactorings of the last days this
bug has slipped in, and since there were several refactorings in that
area, there may be have been further bugs that are not caught by the
current test suite. Revert for now and maybe apply them later again
when there are more tests.

Things kept from the current version are:

The names of most of the rules, as they correspond more closely to C99
and do not affect the behavior in any way.

In type_direct_decl, the replacement of type_attribute_list with
type_attribute since that nonterminal is already part of a repetition
(saves 4 conflicts).

In block_item, the order of the rules corresponds to C99. This has no
influence on the generated parser, except for the rule numbers, which
are informative.

The merge of the duplicate code for struct_tag, enum_tag and
enum_constant, as they all contained exactly the same code.
 1.2 11-Jul-2021  rillig tests/lint: analyze yesterday's bug for parsing declarations
 1.1 06-Jul-2021  rillig 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.
 1.10 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.9 28-Mar-2023  rillig branches: 1.9.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.8 28-Jan-2023  rillig tests/lint: document how compilers promote bit-fields
 1.7 28-Jan-2023  rillig tests/lint: investigate how compilers interpret bit-fields
 1.6 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.5 04-May-2021  rillig lint: fix assertion failure when promoting a bit-field larger than int
 1.4 04-May-2021  rillig tests/lint: demonstrate assertion failure "len == size_in_bits(INT)"

Seen on sparc64 in hdtoa.c:341 since sparc64 is one of the platforms
that has 128-bit long double and defines struct ieee_ext.ext_frach:48
based on uint64_t, which is a GCC extension. Plain C99 only allows
_Bool, signed int and unsigned int as base type for bit-fields.
 1.3 02-May-2021  rillig lint: allow large integer types for bit-fields in GCC mode

These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger. That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it? For now, continue to warn about these.
 1.2 02-May-2021  rillig tests/lint: fix test for GCC bit-field types

The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode. Therefore, use the default lint1-flags
that include -g.
 1.1 02-May-2021  rillig tests/lint: add test for bit-field types in GCC mode
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 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.3 02-May-2021  rillig lint: allow large integer types for bit-fields in GCC mode

These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger. That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it? For now, continue to warn about these.
 1.2 02-May-2021  rillig tests/lint: fix test for GCC bit-field types

The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode. Therefore, use the default lint1-flags
that include -g.
 1.1 02-May-2021  rillig tests/lint: add test for bit-field types in GCC mode
 1.6 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.5 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.4 07-Jul-2023  rillig branches: 1.4.2;
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.3 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.2 06-Dec-2021  rillig lint: fix return type of GCC's __builtin_alloca

Needed for libgmp.
 1.1 06-Dec-2021  rillig tests/lint: demonstrate wrong warning for __builtin_alloca
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 06-Dec-2021  rillig lint: fix return type of GCC's __builtin_alloca

Needed for libgmp.
 1.1 06-Dec-2021  rillig tests/lint: demonstrate wrong warning for __builtin_alloca
 1.3 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.2 03-Sep-2021  rillig lint: set the return type of __builtin_*_overflow to bool, not int

Needed for inetd.c in strict bool mode.
 1.1 03-Sep-2021  rillig tests/lint: test GCC builtins for overflow in strict bool mode

Seen in inetd.c.
 1.3 17-Jun-2022  rillig 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'.
 1.2 03-Sep-2021  rillig lint: set the return type of __builtin_*_overflow to bool, not int

Needed for inetd.c in strict bool mode.
 1.1 03-Sep-2021  rillig tests/lint: test GCC builtins for overflow in strict bool mode

Seen in inetd.c.
 1.4 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.3 03-Aug-2021  rillig lint: in strict enum mode, error out on enum type mismatch in union cast
 1.2 03-Aug-2021  rillig lint: merge almost duplicate code from 'sametype' into 'eqtype'

In 'sametype', the branch for comparing array types was unreachable
since it requires both tspecs to be the same, but t2 underwent the
array-to-pointer conversion.

Previously, lint warned about enum type mismatches, even without -e for
strict enum mode. Instead, it got the case for 'char *' wrong, which is
now fixed. Now lint behaves like GCC 10.3.0 in this regard. The
warning about enum mismatch is useful though, so it may be re-added in a
future commit.
 1.1 03-Aug-2021  rillig tests/lint: test GCC extension for casting to union type
 1.4 17-Jun-2022  rillig 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'.
 1.3 03-Aug-2021  rillig lint: in strict enum mode, error out on enum type mismatch in union cast
 1.2 03-Aug-2021  rillig lint: merge almost duplicate code from 'sametype' into 'eqtype'

In 'sametype', the branch for comparing array types was unreachable
since it requires both tspecs to be the same, but t2 underwent the
array-to-pointer conversion.

Previously, lint warned about enum type mismatches, even without -e for
strict enum mode. Instead, it got the case for 'char *' wrong, which is
now fixed. Now lint behaves like GCC 10.3.0 in this regard. The
warning about enum mismatch is useful though, so it may be re-added in a
future commit.
 1.1 03-Aug-2021  rillig tests/lint: test GCC extension for casting to union type
 1.8 29-Jul-2023  rillig lint: condense code for ending a function

No functional change.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 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.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 18-Apr-2021  rillig tests/lint: remove work-in-progress code

The only purpose of the additional initializers was to generate an error
message, to make the .exp file non-empty. This is no longer needed.
 1.3 17-Apr-2021  rillig lint: fix assertion failure for temporary objects in initialization
 1.2 17-Apr-2021  rillig tests/lint: fix analysis from previous commit, add another example

This is not a GCC feature, it's required by C99 already.
 1.1 17-Apr-2021  rillig tests/lint: demonstrate assertion failure in initialization
 1.6 17-Jun-2022  rillig 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'.
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 18-Apr-2021  rillig tests/lint: remove work-in-progress code

The only purpose of the additional initializers was to generate an error
message, to make the .exp file non-empty. This is no longer needed.
 1.3 17-Apr-2021  rillig lint: fix assertion failure for temporary objects in initialization
 1.2 17-Apr-2021  rillig tests/lint: fix analysis from previous commit, add another example

This is not a GCC feature, it's required by C99 already.
 1.1 17-Apr-2021  rillig tests/lint: demonstrate assertion failure in initialization
 1.3 15-Jul-2023  rillig lint: fix member lookup after GCC statement expression
 1.2 15-Jul-2023  rillig lint: fix use-after-free bug in GCC statement expressions
 1.1 15-Jul-2023  rillig tests/lint: demonstrate use-after-free in GCC statement expression
 1.5 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.4 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.3 21-Jul-2021  rillig lint: rename ignore_up_to_rparen to match the grammar rule

No functional change.
 1.2 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.1 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.3 17-Jun-2022  rillig 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'.
 1.2 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.1 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.7 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 21-Jan-2023  rillig lint: fix null pointer dereference on invalid argument to __typeof__
 1.4 10-Apr-2022  rillig lint: fix assertion failure on duplicate qualifiers from __typeof__
 1.3 25-Jul-2021  rillig lint: do not parse 'typeof(0)(void)' as function call

Previously, lint tried to parse 'typeof(0)(void)' as 'typeof'
'(0)(void)', which tries to call 0 as a function.
 1.2 25-Jul-2021  rillig tests/lint: document parse error for GCC typeof
 1.1 25-Jul-2021  rillig tests/lint: demonstrate missing support for GCC typeof
 1.4 17-Jun-2022  rillig 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'.
 1.3 25-Jul-2021  rillig lint: do not parse 'typeof(0)(void)' as function call

Previously, lint tried to parse 'typeof(0)(void)' as 'typeof'
'(0)(void)', which tries to call 0 as a function.
 1.2 25-Jul-2021  rillig tests/lint: document parse error for GCC typeof
 1.1 25-Jul-2021  rillig tests/lint: demonstrate missing support for GCC typeof
 1.7 08-Jun-2024  rillig tests/lint: group tests by topic
 1.6 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.5 05-Feb-2023  rillig tests/lint: clean up

The .exp files are no longer kept under version control, so there's no
reason anymore to forcefully trigger a warning or an error.
 1.4 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.3 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.2 03-May-2021  rillig lint: fix parsing of __typeof__ after statement in ({ ... })

Since C99, declarations and statements can be freely mixed, and GCC
supported this even before 1999.
 1.1 22-Apr-2021  rillig tests/lint: add test for typeof after statement

Found by christos@.
 1.3 17-Jun-2022  rillig 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'.
 1.2 03-May-2021  rillig lint: fix parsing of __typeof__ after statement in ({ ... })

Since C99, declarations and statements can be freely mixed, and GCC
supported this even before 1999.
 1.1 22-Apr-2021  rillig tests/lint: add test for typeof after statement

Found by christos@.
 1.2 05-Jul-2023  rillig tests/lint: spell platform identifiers for 'long double' consistently

The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
 1.1 10-Oct-2021  rillig tests/lint: remove duplicate platform, generate platforms list

It was an unreliable idea to extract the platform properties from the
targparam.h files manually, even if it was a one-time job. I still made
a mistake by accidentally marking aarch64 as schar, even though it is
uchar, plus I duplicated the line for powerpc64.

Remove the duplicate line, no functional change.
 1.18 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.17 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.16 08-Jun-2024  rillig branches: 1.16.2;
tests/lint: group tests by topic
 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: remove obsolete comments

The handling of initializers was completely rewritten in init.c 1.228
from 2021-12-21.
 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 19-Jun-2022  rillig tests/lint: add quotes around placeholders in a few messages
 1.11 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.10 22-Dec-2021  rillig lint: fix handling of initializations

The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
 1.9 21-Dec-2021  rillig lint: treat incomplete union in the same way as incomplete struct

The newly added tests triggered the assertion in begin_designation since
for incomplete types the initialization is stopped before handling the
first brace.
 1.8 21-Dec-2021  rillig tests/lint: test initialization of incomplete union

The function initialization_lbrace only mentions STRUCT, which looks
suspicious.
 1.7 17-Dec-2021  rillig lint: fix initialization with few braces from function

Seen in Postfix, smtp_proto.c.
 1.6 17-Dec-2021  rillig tests/lint: demonstrate another initialization with few braces

Seen in Postfix, smtp_proto.c.
 1.5 17-Dec-2021  rillig lint: fix initialization of array with fewer braces

Seen in Postfix, cleanup_strerror.c.
 1.4 17-Dec-2021  rillig tests/lint: demonstrate another initialization that lint cannot handle

Seen in external/ibm-public/postfix/dist/src/global/cleanup_strerror.c.
 1.3 17-Dec-2021  rillig lint: work around lint bug in initialization with few braces

Needs a proper fix later, but for now, this workaround allows to run
lint on Postfix again.
 1.2 17-Dec-2021  rillig lint: demonstrate wrong error message in initialization

History of the new test fragment:

libexec/2021.09.14.19.44.40-plain/lint1
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| exit status 1
libexec/2021.04.01.14.20.30-plain/lint1

libexec/2021.03.30.20.23.30-plain/lint1
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'int' [185]
| (15): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| (15): error: cannot initialize 'struct typedef histogram_entry'
| from 'int' [185]
| exit status 1
libexec/2021.03.30.14.25.28-plain/lint1

libexec/2021.03.29.21.34.17-plain/lint1
| (15): error: too many struct/union initializers [172]
| exit status 1
libexec/2021.03.28.15.36.37-plain/lint1

libexec/2021.03.28.14.13.18-plain/lint1
| (18): error: too many struct/union initializers [172]
| exit status 1
libexec/2021.03.21.20.44.59-plain/lint1

libexec/2021.03.21.20.30.19-plain/lint1
| (18): too many struct/union initializers [172]
| exit status 1
libexec/2014.11.20.20.49.06-plain/lint1

libexec/2014.11.20.20.48.33-plain/lint1
| exit status 0
 1.1 10-Jul-2021  rillig tests/lint: add more tests for covering the grammar
 1.16.2.1 02-Aug-2025  perseant Sync with HEAD
 1.12 17-Jun-2022  rillig 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'.
 1.11 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.10 22-Dec-2021  rillig lint: fix handling of initializations

The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
 1.9 21-Dec-2021  rillig lint: treat incomplete union in the same way as incomplete struct

The newly added tests triggered the assertion in begin_designation since
for incomplete types the initialization is stopped before handling the
first brace.
 1.8 21-Dec-2021  rillig tests/lint: test initialization of incomplete union

The function initialization_lbrace only mentions STRUCT, which looks
suspicious.
 1.7 17-Dec-2021  rillig lint: fix initialization with few braces from function

Seen in Postfix, smtp_proto.c.
 1.6 17-Dec-2021  rillig tests/lint: demonstrate another initialization with few braces

Seen in Postfix, smtp_proto.c.
 1.5 17-Dec-2021  rillig lint: fix initialization of array with fewer braces

Seen in Postfix, cleanup_strerror.c.
 1.4 17-Dec-2021  rillig tests/lint: demonstrate another initialization that lint cannot handle

Seen in external/ibm-public/postfix/dist/src/global/cleanup_strerror.c.
 1.3 17-Dec-2021  rillig lint: work around lint bug in initialization with few braces

Needs a proper fix later, but for now, this workaround allows to run
lint on Postfix again.
 1.2 17-Dec-2021  rillig lint: demonstrate wrong error message in initialization

History of the new test fragment:

libexec/2021.09.14.19.44.40-plain/lint1
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| exit status 1
libexec/2021.04.01.14.20.30-plain/lint1

libexec/2021.03.30.20.23.30-plain/lint1
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'int' [185]
| (15): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| (15): error: cannot initialize 'struct typedef histogram_entry'
| from 'int' [185]
| exit status 1
libexec/2021.03.30.14.25.28-plain/lint1

libexec/2021.03.29.21.34.17-plain/lint1
| (15): error: too many struct/union initializers [172]
| exit status 1
libexec/2021.03.28.15.36.37-plain/lint1

libexec/2021.03.28.14.13.18-plain/lint1
| (18): error: too many struct/union initializers [172]
| exit status 1
libexec/2021.03.21.20.44.59-plain/lint1

libexec/2021.03.21.20.30.19-plain/lint1
| (18): too many struct/union initializers [172]
| exit status 1
libexec/2014.11.20.20.49.06-plain/lint1

libexec/2014.11.20.20.48.33-plain/lint1
| exit status 0
 1.1 10-Jul-2021  rillig tests/lint: add more tests for covering the grammar
 1.11 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.10 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.9 21-Jul-2023  rillig branches: 1.9.2;
lint: reword message about non-constant initializer
 1.8 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.7 01-Jul-2023  rillig lint: fix initialization of unnamed union member
 1.6 30-Jun-2023  rillig tests/lint: test initializing an unnamed union
 1.5 30-Jun-2023  rillig lint: fix handling of unnamed struct/union members

The support for unnamed struct/union members that was added in decl.c
1.60 from 2015-10-13 was simple but wrong. It didn't cover initializers
of these structures and computed wrong sizes for structures containing
anonymous unions. At that time, the handling of initializers was broken
as well, it was fixed 6 years later in init.c 1.229 from 2021-12-22.

Real-life examples for code that lint couldn't handle are:

* external/bsd/jemalloc/dist/src/jemalloc.c
* external/mit/xorg/lib/dri.old/Makefile
 1.4 30-Jun-2023  rillig tests/lint: add more tests for sizeof, offsetof, alignof
 1.3 28-Jun-2023  rillig tests/lint: demonstrate wrong handling of nested initializer

Seen in external/bsd/jemalloc/dist/src/jemalloc.c, init_lock.
 1.2 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.1 20-Dec-2021  rillig tests/lint: test excess braces around initializers
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 17-Jun-2022  rillig 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'.
 1.1 20-Dec-2021  rillig tests/lint: test excess braces around initializers
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.2 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.1 10-Jul-2021  rillig tests/lint: add more tests for covering the grammar
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.2 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.1 10-Jul-2021  rillig tests/lint: add more tests for covering the grammar
 1.5 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.4 27-Feb-2025  rillig lint: normalize whitespace
 1.3 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.2 09-Jun-2024  rillig branches: 1.2.2;
lint: warn about lossy floating point constant to integer conversions
 1.1 08-Jun-2024  rillig tests/lint: group tests by topic
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 05-Nov-2024  rillig lint: fix cross references in comments
 1.5 08-Jun-2024  rillig branches: 1.5.2;
tests/lint: group tests by topic
 1.4 08-Jun-2024  rillig 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.
 1.3 28-Mar-2024  rillig lint: clean up
 1.2 06-Aug-2023  rillig lint: since C99, a non-void function must return a value
 1.1 06-Aug-2023  rillig tests/lint: document how much of C99 lint already implements
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.9 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.8 19-Jan-2024  rillig lint: allow '\e' only in GCC mode
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 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.5 01-Apr-2022  rillig tests/lint: fix comment about backslash-newline
 1.4 29-Jun-2021  rillig tests/lint: add test for character constant using backslash-newline
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 20-Jun-2021  rillig tests/lint: remove outdated comment about '\0'

That comment was only needed for lex.c 1.38 from 2021-06-18, which was
fixed with lex.c 1.39 from 2021-06-19, just a day later.
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.4 17-Jun-2022  rillig 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'.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 20-Jun-2021  rillig tests/lint: remove outdated comment about '\0'

That comment was only needed for lex.c 1.38 from 2021-06-18, which was
fixed with lex.c 1.39 from 2021-06-19, just a day later.
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.3 29-Jun-2021  rillig 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.
 1.2 29-Jun-2021  rillig lint: document where to fix the wrong warning for '\xff'
 1.1 29-Jun-2021  rillig 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".
 1.3 29-Jun-2021  rillig 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.
 1.2 29-Jun-2021  rillig lint: document where to fix the wrong warning for '\xff'
 1.1 29-Jun-2021  rillig 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".
 1.3 04-Oct-2024  rillig lint: fix suppressed warnings after if-else-if statement

Seen in sbin/dump/main.c, the "cp = strchr" line.

The bug had been there since at least 2002.
 1.2 04-Oct-2024  rillig tests/lint: demonstrate ignored LINTED comment after if-else-if
 1.1 19-Jun-2021  rillig branches: 1.1.4;
lint: fix endless loop on unfinished comment at EOF

Found using afl.
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.2 17-Jun-2022  rillig 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'.
 1.1 19-Jun-2021  rillig lint: fix endless loop on unfinished comment at EOF

Found using afl.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 18-Feb-2023  rillig lint: remove compat code for lexing hex floating point literals

Hex floating literals are required by C99.
 1.2 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.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.3 17-Jun-2022  rillig 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'.
 1.2 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.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.11 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.10 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.9 28-Aug-2021  rillig tests/lint: test parsing of octal integer constants
 1.8 28-Aug-2021  rillig tests/lint: test parsing of integer constants

The previous version of this test did not focus on the integer constants
but instead on conversions of function arguments. The current test
covers several corner cases, such as non-decimal bases and all
combinations of suffixes.

This test does not cover lex_integer_constant completely since several
code paths are only reachable on 32-bit target platforms.
 1.7 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.6 13-Jul-2021  rillig tests/lint: test binary integer literals and underscores
 1.5 10-Jul-2021  rillig tests/lint: test lexing of integer suffixes
 1.4 29-Jun-2021  rillig 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".
 1.3 29-Jun-2021  rillig tests/lint: allow tests to be skipped depending on platform properties
 1.2 27-Jun-2021  rillig tests/lint: allow skipping individual tests

Depending on the platform, some tests do not make sense or produce
platform-dependent results. Allow these tests to be marked as such.

For example, the test lex_integer.c only works on 64-bit platforms.
Therefore it is disabled on i386 for now since it prints different
warnings there. Even better would be a "lint1-only-on-lpi32" toggle,
but that would need detection of 'sizeof(int)' at runtime.
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.5 17-Jun-2022  rillig 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'.
 1.4 28-Aug-2021  rillig tests/lint: test parsing of octal integer constants
 1.3 28-Aug-2021  rillig tests/lint: test parsing of integer constants

The previous version of this test did not focus on the integer constants
but instead on conversions of function arguments. The current test
covers several corner cases, such as non-decimal bases and all
combinations of suffixes.

This test does not cover lex_integer_constant completely since several
code paths are only reachable on 32-bit target platforms.
 1.2 27-Jun-2021  rillig tests/lint: allow skipping individual tests

Depending on the platform, some tests do not make sense or produce
platform-dependent results. Allow these tests to be marked as such.

For example, the test lex_integer.c only works on 64-bit platforms.
Therefore it is disabled on i386 for now since it prints different
warnings there. Even better would be a "lint1-only-on-lpi32" toggle,
but that would need detection of 'sizeof(int)' at runtime.
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 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.1 13-Jul-2021  rillig tests/lint: test binary integer literals and underscores
 1.2 17-Jun-2022  rillig 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'.
 1.1 13-Jul-2021  rillig tests/lint: test binary integer literals and underscores
 1.9 28-Jan-2024  rillig tests/lint: fix tests for integer constants on ILP32 platforms

The comment in msg_218 was both off-topic and wrong, so remove it.
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 19-Feb-2023  rillig tests/lint: fix and extend tests for C90 migration warning
 1.6 05-Feb-2023  rillig 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.
 1.5 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.4 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.3 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.2 29-Jun-2021  rillig 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".
 1.1 29-Jun-2021  rillig 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.
 1.2 17-Jun-2022  rillig 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'.
 1.1 29-Jun-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 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.4 20-Nov-2021  rillig tests/lint: fix negation in explanation for strict bool mode
 1.3 23-Aug-2021  rillig tests/lint: add tests for integer comparisons
 1.2 19-Jun-2021  rillig lint: revert fix for endless loop in lexer for string literals

String literals may contain null bytes, and these must be passed further
on.

This reintroduces the endless loop in the lexer, but that must be fixed
in another way that doesn't destroy the error handling.
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.4 17-Jun-2022  rillig 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'.
 1.3 23-Aug-2021  rillig tests/lint: add tests for integer comparisons
 1.2 19-Jun-2021  rillig lint: revert fix for endless loop in lexer for string literals

String literals may contain null bytes, and these must be passed further
on.

This reintroduces the endless loop in the lexer, but that must be fixed
in another way that doesn't destroy the error handling.
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.3 03-Feb-2024  rillig lint: remove unused code for converting multibyte character sequences
 1.2 02-Feb-2024  rillig lint: use the locale for interpreting wide character strings
 1.1 02-Feb-2024  rillig tests/lint: test UTF-8 mode
 1.1 10-Sep-2021  rillig tests/lint: test line number tracking with \v and \f
 1.2 17-Jun-2022  rillig 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'.
 1.1 10-Sep-2021  rillig tests/lint: test line number tracking with \v and \f
 1.5 19-Jan-2024  rillig lint: allow '\e' only in GCC mode
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 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.2 20-Jun-2021  rillig lint: fix check for empty wide character constant

This bug got almost 26 years old, it was already there at the initial
commit in 1995.
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.3 17-Jun-2022  rillig 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'.
 1.2 20-Jun-2021  rillig lint: fix check for empty wide character constant

This bug got almost 26 years old, it was already there at the initial
commit in 1995.
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.5 02-Feb-2024  rillig tests/lint: add UTF-8 test for string literals
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 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.2 23-Aug-2021  rillig tests/lint: add tests for integer comparisons
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.3 17-Jun-2022  rillig 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'.
 1.2 23-Aug-2021  rillig tests/lint: add tests for integer comparisons
 1.1 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.1 08-Jul-2021  rillig 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.
 1.2 17-Jun-2022  rillig 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'.
 1.1 08-Jul-2021  rillig 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.
 1.9 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.8 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.7 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.6 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.5 24-Apr-2022  rillig tests/lint: demonstrate missing check for missing type
 1.4 31-Jan-2021  rillig lint: add quotes to messages 1 and 19
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.7 17-Jun-2022  rillig 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'.
 1.6 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.5 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.4 24-Apr-2022  rillig tests/lint: demonstrate missing check for missing type
 1.3 31-Jan-2021  rillig lint: add quotes to messages 1 and 19
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.1 08-Jul-2021  rillig 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.
 1.2 17-Jun-2022  rillig 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'.
 1.1 08-Jul-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.4 08-Jul-2021  rillig 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.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.3 08-Jul-2021  rillig 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.
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.9 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.8 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.7 02-Aug-2023  rillig branches: 1.7.2;
lint: distinguish between arguments and parameters
 1.6 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.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 31-Jan-2021  rillig lint: add a few more tests
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 09-Apr-2021  rillig lint: for structs and unions, include incompleteness in the type name

This mainly helps to assess the situation where lint warns that a
pointer cast "may be troublesome", see msg_247.exp.
 1.3 31-Jan-2021  rillig lint: be more precise in message 003 "tag in argument list"
 1.2 31-Jan-2021  rillig lint: add a few more tests
 1.1 02-Jan-2021  rillig 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.
 1.10 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.9 30-Nov-2024  rillig tests/lint: add a few more tests to increase code coverage
 1.8 04-May-2024  rillig branches: 1.8.2;
lint: increase debug logging for declarations

All changes to the global variable 'dcs' are tracked now, to help
identify the cause of the failing tests in expr_sizeof and
gcc_attribute_aligned.

While here, test more invalid type combinations in typedefs.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.5 04-Jul-2021  rillig tests/lint: document why lint does not need to detect wrong types
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 03-Jan-2021  rillig lint: fix spelling of message 308

All other messages are lowercase as well.
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 04-May-2024  rillig branches: 1.6.2;
lint: increase debug logging for declarations

All changes to the global variable 'dcs' are tracked now, to help
identify the cause of the failing tests in expr_sizeof and
gcc_attribute_aligned.

While here, test more invalid type combinations in typedefs.
 1.5 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.4 04-Sep-2021  rillig lint: reduce indentation in tdeferr

No functional change.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 04-Sep-2021  rillig lint: reduce indentation in tdeferr

No functional change.
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 28-Mar-2023  rillig branches: 1.6.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.4 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.5 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.4 15-Jun-2022  rillig branches: 1.4.4;
tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.4.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.6 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.7 13-Jul-2023  rillig lint: _Thread_local is a storage class, not a type qualifier
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 30-Apr-2022  rillig lint: document why C11 keywords are available in C99 mode as well
 1.4 18-Jan-2021  rillig lint: fix assertion failure for restrict and _Thread_local
 1.3 18-Jan-2021  rillig lint: add more test cases for duplicate type qualifiers
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 30-Apr-2022  rillig lint: document why C11 keywords are available in C99 mode as well
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.8 08-Jun-2024  rillig lint: add details to warnings about negative constant to unsigned
 1.7 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.6 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.5 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.4 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.3 07-Jan-2021  rillig lint: revert test for message 11

That test only produced other messages, but not message 11.
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 07-Jan-2021  rillig lint: revert test for message 11

That test only produced other messages, but not message 11.
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.9 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.8 28-Mar-2023  rillig branches: 1.8.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 12-May-2022  rillig lint: fix support for __alignof__, add support for __alignof

Broken since lex.c 1.129 from yesterday.
 1.6 12-May-2022  rillig 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.
 1.5 02-Apr-2022  rillig lint: remove unreachable message 'compiler takes alignment of function'
 1.4 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 17-Jun-2022  rillig 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'.
 1.7 12-May-2022  rillig lint: fix support for __alignof__, add support for __alignof

Broken since lex.c 1.129 from yesterday.
 1.6 12-May-2022  rillig 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.
 1.5 02-Apr-2022  rillig lint: remove unreachable message 'compiler takes alignment of function'
 1.4 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 01-Apr-2022  rillig lint: add details to message about illegal return type
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 01-Apr-2022  rillig lint: add details to message about illegal return type
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 28-Mar-2023  rillig branches: 1.6.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 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.4 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.9 28-Jan-2024  rillig tests/lint: enforce diagnostics to be listed in chronologic order

While here, fix the tests on uchar platforms.
 1.8 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add quotes to messages 1 and 19
 1.2 31-Jan-2021  rillig lint: test messages 019 and 021
 1.1 02-Jan-2021  rillig 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.
 1.8 17-Jun-2022  rillig 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'.
 1.7 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.6 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.5 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 31-Jan-2021  rillig lint: add quotes to messages 1 and 19
 1.2 31-Jan-2021  rillig lint: test messages 019 and 021
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.7 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.6 02-Aug-2023  rillig branches: 1.6.2;
lint: distinguish between arguments and parameters
 1.5 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.4 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.3 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.2 31-Jan-2021  rillig lint: test messages 019 and 021
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 31-Jan-2021  rillig lint: test messages 019 and 021
 1.1 02-Jan-2021  rillig 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.
 1.8 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.7 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.6 28-Mar-2023  rillig branches: 1.6.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.4 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.3 02-Apr-2022  rillig lint: try harder to recover after syntax errors

lint: assertion "false" failed in declarator_name at decl.c:1596
near msg_022.c:22
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.3 02-Apr-2022  rillig lint: try harder to recover after syntax errors

lint: assertion "false" failed in declarator_name at decl.c:1596
near msg_022.c:22
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 11-Jul-2021  rillig lint: add quotes around placeholders in message 23 and 232
 1.3 11-Jul-2021  rillig lint: support __attribute__((hot))

The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jul-2021  rillig lint: add quotes around placeholders in message 23 and 232
 1.3 11-Jul-2021  rillig lint: support __attribute__((hot))

The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 21-Jul-2023  rillig lint: reword message about non-constant initializer
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 19-Jun-2022  rillig tests/lint: add quotes around placeholders in a few messages
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 19-Jun-2022  rillig tests/lint: add quotes around placeholders in a few messages
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 19-Jun-2022  rillig tests/lint: add quotes around placeholders in a few messages
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.6 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.5 12-Sep-2021  rillig 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.
 1.4 12-Sep-2021  rillig tests/lint: demonstrate parse error for function-type parameters

Seen in sbin/fsck_lfs/vnode.c(104), where lint wrongly complains:

error: redeclaration of register_vget [27]
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.8 17-Jun-2022  rillig 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'.
 1.7 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.6 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.5 12-Sep-2021  rillig 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.
 1.4 12-Sep-2021  rillig tests/lint: demonstrate parse error for function-type parameters

Seen in sbin/fsck_lfs/vnode.c(104), where lint wrongly complains:

error: redeclaration of register_vget [27]
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 19-Jun-2022  rillig tests/lint: add quotes around placeholders in a few messages
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 19-Jun-2022  rillig tests/lint: add quotes around placeholders in a few messages
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.8 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.7 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.6 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.5 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.4 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.4 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.9 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.8 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.7 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.6 13-Jul-2021  rillig lint: fix wording of message for incomplete struct (2021-07-04)

A struct member is not an argument. In err.c 1.124 from 2021-07-04, the
wording had been changed, without noticing that the message was used
twice: once for an argument, once for a struct member.
 1.5 04-Jul-2021  rillig lint: improve wording for incomplete struct or union
 1.4 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.9 17-Jun-2022  rillig 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'.
 1.8 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.7 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.6 13-Jul-2021  rillig lint: fix wording of message for incomplete struct (2021-07-04)

A struct member is not an argument. In err.c 1.124 from 2021-07-04, the
wording had been changed, without noticing that the message was used
twice: once for an argument, once for a struct member.
 1.5 04-Jul-2021  rillig lint: improve wording for incomplete struct or union
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.10 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.9 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.8 02-Aug-2023  rillig branches: 1.8.2;
lint: distinguish between arguments and parameters
 1.7 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.6 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 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.5 16-May-2021  rillig 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]
 1.4 16-May-2021  rillig lint: add type information to unportable bit-field type

Seeing the message "unportable bit-field type 'int'" may sound strange
at first, but that's a strict interpretation of the wording in C99
6.7.2.1p4, which requires that the bit-field type is "'_Bool', 'unsigned
int' or 'signed int', or some other implementation-defined type".

The rationale for C99 6.7.2.1 explicitly lists plain 'int' among the
allowed types for bit-fields, regardless of any additional
implementation-defined types. This means that lint had interpreted this
paragraph wrong, and it should be fixed to allow plain int as well.
 1.3 31-Jan-2021  rillig branches: 1.3.2;
lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.3.2.1 31-May-2021  cjep sync with head
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-May-2021  rillig 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]
 1.3 16-May-2021  rillig lint: add type information to unportable bit-field type

Seeing the message "unportable bit-field type 'int'" may sound strange
at first, but that's a strict interpretation of the wording in C99
6.7.2.1p4, which requires that the bit-field type is "'_Bool', 'unsigned
int' or 'signed int', or some other implementation-defined type".

The rationale for C99 6.7.2.1 explicitly lists plain 'int' among the
allowed types for bit-fields, regardless of any additional
implementation-defined types. This means that lint had interpreted this
paragraph wrong, and it should be fixed to allow plain int as well.
 1.2 03-Jan-2021  rillig branches: 1.2.2;
lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.2.2.1 31-May-2021  cjep sync with head
 1.12 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.11 15-Jun-2022  rillig branches: 1.11.4;
tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.10 22-Dec-2021  rillig lint: use C90 instead of C89 when referring to the C standard
 1.9 02-May-2021  rillig tests/lint: add test for bit-field types in GCC mode
 1.8 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.7 28-Feb-2021  rillig lint: add type information to 'illegal bit-field type'
 1.6 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.5 02-Jan-2021  rillig lint: fix message 308 "Invalid type for _Complex"

Previously, lint aborted since it didn't expect tspec_name to be called
with NOTSPEC, which at that point was the only possible value of
dcs->d_cmod.
 1.4 02-Jan-2021  rillig lint: allow _Bool for bit-fields
 1.3 02-Jan-2021  rillig lint: fix and document test for illegal bit-fields

The _Complex bit-field should have been commented out.
 1.2 02-Jan-2021  rillig lint: add test for message 35: illegal bit-field type

Bug: _Bool is not accepted as a bit-field, but it should be.

Bug: lint aborts in a controlled manner with message "common/tyname.c,
190: tspec_name(0)" when it sees a declaration of a _Complex bit-field.
(Not that a _Complex bit-field would make any sense.)
 1.1 02-Jan-2021  rillig 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.
 1.11.4.1 02-Aug-2025  perseant Sync with HEAD
 1.13 17-Jun-2022  rillig 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'.
 1.12 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.11 02-May-2021  rillig tests/lint: add test for bit-field types in GCC mode
 1.10 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.9 07-Mar-2021  rillig lint: in the name of an array type, list the dimension first

before: array of unsigned int[4]
now: array[4] of unsigned int

Listing the array dimension first keeps it in contact with the keyword
'array'. This reduces confusion, especially for nested arrays.
 1.8 28-Feb-2021  rillig lint: add type information to 'illegal bit-field type'
 1.7 31-Jan-2021  rillig lint: add quotes to messages 1 and 19
 1.6 03-Jan-2021  rillig lint: fix spelling of message 308

All other messages are lowercase as well.
 1.5 02-Jan-2021  rillig lint: fix message 308 "Invalid type for _Complex"

Previously, lint aborted since it didn't expect tspec_name to be called
with NOTSPEC, which at that point was the only possible value of
dcs->d_cmod.
 1.4 02-Jan-2021  rillig lint: allow _Bool for bit-fields
 1.3 02-Jan-2021  rillig lint: fix and document test for illegal bit-fields

The _Complex bit-field should have been commented out.
 1.2 02-Jan-2021  rillig lint: add test for message 35: illegal bit-field type

Bug: _Bool is not accepted as a bit-field, but it should be.

Bug: lint aborts in a controlled manner with message "common/tyname.c,
190: tspec_name(0)" when it sees a declaration of a _Complex bit-field.
(Not that a _Complex bit-field would make any sense.)
 1.1 02-Jan-2021  rillig 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.
 1.5 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.4 15-Jun-2022  rillig branches: 1.4.4;
tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.4.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.5 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.4 28-Mar-2023  rillig branches: 1.4.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 14-Sep-2023  rillig lint: fix wording of diagnostics about 'C99 extension'

The term 'extension' means an extension to a C standard. C99 by itself
is not an extension but a revision of the C standard.
 1.4 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.3 05-Apr-2022  rillig tests/lint: add tests for a few early messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 07-Feb-2022  rillig lint: reword message about bit-field in a union

There is nothing illegal about a bit-field in a union, it is allowed by
C90, C99 and C11.

Fixes PR toolchain/53219.
 1.3 07-Feb-2022  rillig tests/lint: add test for message 41 about bit-field in union

See PR toolchain/53219.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 07-Feb-2022  rillig lint: reword message about bit-field in a union

There is nothing illegal about a bit-field in a union, it is allowed by
C90, C99 and C11.

Fixes PR toolchain/53219.
 1.3 07-Feb-2022  rillig tests/lint: add test for message 41 about bit-field in union

See PR toolchain/53219.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.7 26-Aug-2023  rillig branches: 1.7.2;
lint: make diagnostics about ANSI C more international
 1.6 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.5 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 16-Aug-2021  rillig lint: add more details to message about redeclared tag
 1.3 16-Aug-2021  rillig tests/lint: test message for redeclared tags
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 16-Aug-2021  rillig lint: add more details to message about redeclared tag
 1.3 16-Aug-2021  rillig tests/lint: test message for redeclared tags
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 14-Sep-2023  rillig lint: fix wording of diagnostics about 'C99 extension'

The term 'extension' means an extension to a C standard. C99 by itself
is not an extension but a revision of the C standard.
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.3 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.5 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.4 08-Apr-2022  rillig lint: fix undefined behavior on enum overflow (since 1995)

GCC had optimized the check away, due to the obvious integer overflow 'x
- 1 == INT_MAX'. To prevent further bugs like this, compile with
-ftrapv.
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 08-Apr-2022  rillig lint: fix undefined behavior on enum overflow (since 1995)

GCC had optimized the check away, due to the obvious integer overflow 'x
- 1 == INT_MAX'. To prevent further bugs like this, compile with
-ftrapv.
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 24-Apr-2022  rillig lint: warn about anonymous struct in struct, in plain C99 mode
 1.4 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 24-Apr-2022  rillig lint: warn about anonymous struct in struct, in plain C99 mode
 1.4 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.6 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.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.9 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.8 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.7 09-Jul-2023  rillig branches: 1.7.2;
lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.6 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.5 07-Jul-2023  rillig branches: 1.5.2;
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.4 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.10 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.9 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.8 02-Aug-2023  rillig branches: 1.8.2;
lint: distinguish between arguments and parameters
 1.7 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.6 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 11-Jul-2023  rillig lint: update wording in diagnostic for C99
 1.4 16-Apr-2022  rillig lint: in C99 mode, allow trailing comma in enum declarations

Adjust the test to be run in C90 mode instead of traditional mode, since
traditional C didn't have enums.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Apr-2022  rillig lint: in C99 mode, allow trailing comma in enum declarations

Adjust the test to be run in C90 mode instead of traditional mode, since
traditional C didn't have enums.
 1.3 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 20-Nov-2024  rillig tests/lint: clean up
 1.6 30-Oct-2024  rillig tests/lint: fix test for 'constant too large' on ILP32 platforms
 1.5 29-Oct-2024  rillig lint: add details to message about too large integer constant
 1.4 15-Jun-2022  rillig branches: 1.4.4;
tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.8 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.7 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.6 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.6 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages about old-style functions
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages about old-style functions
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages about old-style functions
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages about old-style functions
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.9 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.8 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.7 07-Jul-2023  rillig branches: 1.7.2;
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.6 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.5 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages about old-style functions
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages about old-style functions
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.5 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.4 07-Jul-2023  rillig branches: 1.4.2;
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.3 27-Feb-2022  rillig tests/lint: add tests for messages about old-style functions
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages about old-style functions
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.3 12-Jul-2021  rillig tests/lint: test trying to define a ()-less function
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 12-Jul-2021  rillig tests/lint: test trying to define a ()-less function
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 30-Jun-2023  rillig lint: fix computation of bit-field width

When bit-fields in packed structs were added on 2009-10-02, lint assumed
that they would only use 'signed int' or 'unsigned int' as storage unit,
even though C99 also allows _Bool.

The cleanup commit for decl.c 1.225 from 2021-08-28 accidentally changed
the rounding mode for bit-field storage units from round-up to
round-down.
 1.4 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.3 13-Jul-2021  rillig tests/lint: add tests for empty and incomplete structs
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 13-Jul-2021  rillig tests/lint: add tests for empty and incomplete structs
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 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.5 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.4 15-Jul-2021  rillig lint: remove message 66 about missing semicolon in struct-declaration
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.3 15-Jul-2021  rillig lint: remove message 66 about missing semicolon in struct-declaration
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 13-Jul-2021  rillig lint: fix wording of message for incomplete struct (2021-07-04)

A struct member is not an argument. In err.c 1.124 from 2021-07-04, the
wording had been changed, without noticing that the message was used
twice: once for an argument, once for a struct member.
 1.3 13-Jul-2021  rillig tests/lint: add tests for empty and incomplete structs
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 13-Jul-2021  rillig lint: fix wording of message for incomplete struct (2021-07-04)

A struct member is not an argument. In err.c 1.124 from 2021-07-04, the
wording had been changed, without noticing that the message was used
twice: once for an argument, once for a struct member.
 1.3 13-Jul-2021  rillig tests/lint: add tests for empty and incomplete structs
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 30-Nov-2024  rillig tests/lint: add a few more tests to increase code coverage
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.3 08-Apr-2022  rillig lint: remove unused message 70, add some more tests
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 22-Jan-2023  rillig lint: prevent undefined behavior for signed '<<'

Found by manual code inspection, verified by MKSANITIZER=yes
USE_SANITIZER=undefined.
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.8 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.7 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.6 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.5 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.4 08-Jul-2021  rillig 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.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 24-Apr-2022  rillig lint: error out on missing type in declarations
 1.4 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.3 08-Jul-2021  rillig 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.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.8 03-Feb-2024  rillig tests/lint: extend tests for hexadecimal character escapes
 1.7 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.10 03-Feb-2024  rillig tests/lint: extend tests for hexadecimal character escapes
 1.9 03-Feb-2024  rillig lint: allow hexadecimal character escapes up to UINT_MAX

Previously, any value larger than INT_MAX was regarded as negative and
thus terminated the loop around get_escaped_char.
 1.8 03-Feb-2024  rillig lint: allow larger numbers in escapes for wide characters and strings
 1.7 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 22-Jan-2023  rillig lint: prevent undefined behavior for signed '<<'

Found by manual code inspection, verified by MKSANITIZER=yes
USE_SANITIZER=undefined.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.8 03-Feb-2024  rillig lint: allow larger numbers in escapes for wide characters and strings
 1.7 03-Feb-2024  rillig tests/lint: test octal escapes in character and wide strings
 1.6 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.9 03-Feb-2024  rillig lint: warn about short octal escape followed by '8' or '9'

These mistakes is typically found in snprintb format directives but is
probably a typo everywhere else as well.
 1.8 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 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.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 29-Jun-2021  rillig lint: fix lexical analysis of character constants in traditional C

The code now follows the wording of the C Reference Manual from 1978.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 29-Jun-2021  rillig lint: fix lexical analysis of character constants in traditional C

The code now follows the wording of the C Reference Manual from 1978.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 27-Aug-2021  rillig lint: remove unused message about nonportable character escape

It has not been used since at least 2001.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 27-Aug-2021  rillig lint: remove unused message about nonportable character escape

It has not been used since at least 2001.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.5 19-Jan-2024  rillig lint: allow '\e' only in GCC mode
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.1 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.7 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 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.4 04-Jul-2021  rillig tests/lint: fix unintended character constant in test

I originally intended to type ASCII DEL as an example of a nonprintable
character code. The actual character that landed in the code was
instead U+2303 "house", which looks similar to the typical
representation of the DEL character. The UTF-8 byte sequence for that
code point started with \xE2, or in octal \342.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 04-Jul-2021  rillig tests/lint: fix unintended character constant in test

I originally intended to type ASCII DEL as an example of a nonprintable
character code. The actual character that landed in the code was
instead U+2303 "house", which looks similar to the typical
representation of the DEL character. The UTF-8 byte sequence for that
code point started with \xE2, or in octal \342.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.7 02-Feb-2024  rillig branches: 1.7.2;
tests/lint: test lexing of characters and strings
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 16-Apr-2022  rillig lint: model C language levels in a future-compatible way

The options -t, -s and -S are confusing because they are used
inconsistently. The option -S enables C99 features, but when using it
instead of -s, it also doesn't enable all checks required by C90 and
later. Prepare fixing of these inconsistencies by replacing the flag
variables with language levels that can be extended in a
straight-forward way as new C standards arrive.

| option | allow_trad | allow_c90 | allow_c99 | allow_c11 |
|--------|------------|-----------|-----------|-----------|
| -t | x | - | - | - |
| (none) | x | x | - | - |
| -s | - | x | - | - |
| -S | - | x | x | - |
| -Ac11 | - | x | x | x |

Each usage of the old flag variables will be inspected and migrated
individually, to clean up the subtle variations in the conditions and to
provide a simpler model.

When lint was created in 1995, its focus was migrating traditional C
code to C90 code. Lint does not help in migrating from C90 to C99 or
from C99 to C11 since there are only few silent changes, and simply
because nobody took the time to implement these migration aids. If
necessary, such migration modes could be added separately.

There is a small functional change: when the option -s is combined with
either -S or -Ac11, lint now only keeps the last of these options.
Previously, these options could be combined, leading to a mixture of
language levels, halfway between C90, C99 and C11. Especially combining
traditional C with C11 doesn't make sense, but xlint currently allows
it.

The 3 tests that accidentally specified multiple language levels have
been adjusted to a single language level.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.7 02-Feb-2024  rillig branches: 1.7.2;
tests/lint: test lexing of characters and strings
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.8 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.7 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 10-Jul-2021  rillig tests/lint: add another example for storage class in declaration
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 10-Jul-2021  rillig tests/lint: add another example for storage class in declaration
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.5 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.4 16-Apr-2022  rillig tests/lint: refine test for varargs function
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Apr-2022  rillig tests/lint: refine test for varargs function
 1.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.8 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.7 30-Jun-2023  rillig lint: clean up handling of declarations

No functional change.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add a few more tests
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 31-Jan-2021  rillig lint: add a few more tests
 1.2 02-Jan-2021  rillig lint: add a few more tests

No serious bugs found this time.
 1.1 02-Jan-2021  rillig 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.
 1.8 14-Oct-2024  rillig lint: add more details to messages about hidden symbols
 1.7 02-Aug-2023  rillig branches: 1.7.2;
lint: distinguish between arguments and parameters
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.7 14-Oct-2024  rillig lint: add more details to messages about hidden symbols
 1.6 28-Mar-2023  rillig branches: 1.6.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.7 14-Oct-2024  rillig lint: add more details to messages about hidden symbols
 1.6 28-Mar-2023  rillig branches: 1.6.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.5 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.8 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.7 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.6 28-Mar-2023  rillig lint: warn about 'extern' declarations inside function bodies

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html

The previous attempt (message 351 about 'extern' declarations outside
headers) did not cover the proposal from the tech-userlevel mailing list
but instead warns about a different usage pattern of the 'extern'
keyword.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.3 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 20-Jun-2022  rillig lint: add quotes around several placeholders in messages
 1.3 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.6 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.5 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.4 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.3 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 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.5 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.4 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 07-Jul-2023  rillig branches: 1.6.2;
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.5 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.4 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.8 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.7 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.4 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.7 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.6 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.5 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.7 17-Jun-2022  rillig 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'.
 1.6 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.5 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 09-Jul-2023  rillig branches: 1.6.2;
lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.5 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.4 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.3 03-Jul-2021  rillig lint: do not define 'long double' GCC builtins for traditional C
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 09-Jul-2023  rillig branches: 1.6.2;
lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.5 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.4 03-Jul-2021  rillig lint: do not define 'long double' GCC builtins for traditional C
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.6 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.5 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.4 26-Mar-2021  rillig lint: add quotes around placeholder in message about undefined variable

Before: error: expected undefined [99]
After: error: 'expected' undefined [99]

Seen in external/mpl/bind, which for Clang defines in stdatomic.h:
> #define atomic_exchange_explicit(obj, desired, order) \
> __c11_atomic_exchange_explicit(obj, expected, order)
Note the mismatch between 'desired' and 'expected'.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 03-Apr-2022  rillig tests/lint: make a few tests self-contained, add some others
 1.4 26-Mar-2021  rillig lint: add quotes around placeholder in message about undefined variable

Before: error: expected undefined [99]
After: error: 'expected' undefined [99]

Seen in external/mpl/bind, which for Clang defines in stdatomic.h:
> #define atomic_exchange_explicit(obj, desired, order) \
> __c11_atomic_exchange_explicit(obj, expected, order)
Note the mismatch between 'desired' and 'expected'.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 07-Jan-2021  rillig lint: add tests for messages 93, 94, 95, 96, 97, 98, 99
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 20-Jun-2022  rillig branches: 1.6.4;
lint: add quotes around several placeholders in messages
 1.5 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.4 16-Apr-2022  rillig lint: model C language levels in a future-compatible way

The options -t, -s and -S are confusing because they are used
inconsistently. The option -S enables C99 features, but when using it
instead of -s, it also doesn't enable all checks required by C90 and
later. Prepare fixing of these inconsistencies by replacing the flag
variables with language levels that can be extended in a
straight-forward way as new C standards arrive.

| option | allow_trad | allow_c90 | allow_c99 | allow_c11 |
|--------|------------|-----------|-----------|-----------|
| -t | x | - | - | - |
| (none) | x | x | - | - |
| -s | - | x | - | - |
| -S | - | x | x | - |
| -Ac11 | - | x | x | x |

Each usage of the old flag variables will be inspected and migrated
individually, to clean up the subtle variations in the conditions and to
provide a simpler model.

When lint was created in 1995, its focus was migrating traditional C
code to C90 code. Lint does not help in migrating from C90 to C99 or
from C99 to C11 since there are only few silent changes, and simply
because nobody took the time to implement these migration aids. If
necessary, such migration modes could be added separately.

There is a small functional change: when the option -s is combined with
either -S or -Ac11, lint now only keeps the last of these options.
Previously, these options could be combined, leading to a mixture of
language levels, halfway between C90, C99 and C11. Especially combining
traditional C with C11 doesn't make sense, but xlint currently allows
it.

The 3 tests that accidentally specified multiple language levels have
been adjusted to a single language level.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.3 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.10 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9 04-Jul-2021  rillig lint: replace wrong assumption with citation from C99

No functional change.
 1.8 04-Jul-2021  rillig lint: document where to fix missing const in lvalue-to-rvalue

No functional change.
 1.7 04-Jul-2021  rillig lint: align messages for invalid left operand of '.' or '->'
 1.6 30-Jun-2021  rillig lint: fix type name in message 101 for wrong member name
 1.5 30-Jun-2021  rillig tests/lint: extend tests for message 101

This demonstrates the wrong type name in the message.
 1.4 30-Mar-2021  rillig lint: add type information for message about unknown member name
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.9 17-Jun-2022  rillig 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'.
 1.8 04-Jul-2021  rillig lint: replace wrong assumption with citation from C99

No functional change.
 1.7 04-Jul-2021  rillig lint: align messages for invalid left operand of '.' or '->'
 1.6 30-Jun-2021  rillig lint: fix type name in message 101 for wrong member name
 1.5 30-Jun-2021  rillig tests/lint: extend tests for message 101

This demonstrates the wrong type name in the message.
 1.4 30-Mar-2021  rillig lint: add type information for message about unknown member name
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 30-Jun-2023  rillig branches: 1.6.2;
lint: fix handling of unnamed struct/union members

The support for unnamed struct/union members that was added in decl.c
1.60 from 2015-10-13 was simple but wrong. It didn't cover initializers
of these structures and computed wrong sizes for structures containing
anonymous unions. At that time, the handling of initializers was broken
as well, it was fixed 6 years later in init.c 1.229 from 2021-12-22.

Real-life examples for code that lint couldn't handle are:

* external/bsd/jemalloc/dist/src/jemalloc.c
* external/mit/xorg/lib/dri.old/Makefile
 1.5 30-Jun-2023  rillig tests/lint: add more tests for sizeof, offsetof, alignof
 1.4 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.3 14-Dec-2021  rillig tests/lint: demonstrate missing support for anonymous members
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 14-Dec-2021  rillig tests/lint: demonstrate missing support for anonymous members
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 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.3 04-Jul-2021  rillig lint: align messages for invalid left operand of '.' or '->'
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 04-Jul-2021  rillig lint: align messages for invalid left operand of '.' or '->'
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 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.3 04-Jul-2021  rillig lint: align messages for invalid left operand of '.' or '->'
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 04-Jul-2021  rillig lint: align messages for invalid left operand of '.' or '->'
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.4 19-Jun-2022  rillig branches: 1.4.4;
lint: add quotes around placeholders in 4 messages
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 15-Jun-2022  rillig tests/lint: replace 'expect' comments with 'expect+-' comments

The 'expect+-' comments provide more context, which makes it easier to
read the .c files on their own, without having to look up the actual
diagnostics in the .exp files.

Add tests for messages 105 and 106, which were about the obscure feature
of some traditional C compilers that allowed the expression 'x->member'
to access a struct member, even if 'x' had integer type.

The remaining tests will be migrated in a future commit.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 07-Jan-2024  rillig tests/lint: test operators, integer overflow, conversions
 1.6 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.5 03-Jun-2023  rillig lint: provide more detailed types when operands do not match
 1.4 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.9 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.8 22-May-2023  rillig lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.
 1.7 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.4 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.3 09-Jan-2021  rillig lint: fix crash for error 108 (invalid type of unary operator)
 1.2 09-Jan-2021  rillig lint: add test for message 108, which currently crashes
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 09-Jan-2021  rillig lint: fix crash for error 108 (invalid type of unary operator)
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.7 06-Aug-2023  rillig branches: 1.7.2;
lint: since C99, a non-void function must return a value
 1.6 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.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 17-Jun-2022  rillig 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'.
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 25-Jul-2021  rillig tests/lint: test function types and pointer arithmetic
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 25-Jul-2021  rillig tests/lint: test function types and pointer arithmetic
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.3 16-Jun-2022  rillig branches: 1.3.4;
tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 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.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 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.6 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 31-Jan-2021  rillig lint: document that message 108 doesn't abort anymore
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 17-Jun-2022  rillig 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'.
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 31-Jan-2021  rillig lint: document that message 108 doesn't abort anymore
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.11 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.10 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.9 16-Aug-2021  rillig tests/lint: document history of initialization of const members
 1.8 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.7 10-Aug-2021  rillig lint: fix 3 of the 4 wrong messages about lvalue in initial assignment
 1.6 31-Jul-2021  rillig tests/lint: demonstrate more wrong warnings for const struct members

The code 't_const = false' occurs 4 times in the lint code, each
corresponding to one of the wrong warnings in the test.

This bug has been existing at least since 2001. Back then, the lint
output was:

2001.12.24.20.52.09
| (23): lint error: popctrl() 1
| (15): syntax error [249]
| (19): warning: left operand of 'FARG' must be modifiable lvalue [115]
| (21): syntax error [249]
| (23): warning: function initialize_const_struct_member falls off bottom without returning value [217]
| exit status 1

from 2002.12.06.03.27.39
| (23): lint error: func.c, 168: popctrl()
| (15): warning: left operand of '=' must be modifiable lvalue [115]
| (19): warning: left operand of 'FARG' must be modifiable lvalue [115]
| (21): syntax error [249]
| (23): warning: function initialize_const_struct_member falls off bottom without returning value [217]
| exit status 1
until 2003.10.27.00.12.44
 1.5 31-Jul-2021  rillig tests/lint: demonstrate wrong error message for initialization

Seen in usr.bin/make/var.c:4022 in C99 mode, where a ModChain variable
is initialized and two of the members are const-qualified.
 1.4 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.3 17-Jan-2021  rillig lint: add test for incrementing const variable
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.10 17-Jun-2022  rillig 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'.
 1.9 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.8 16-Aug-2021  rillig tests/lint: document history of initialization of const members
 1.7 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.6 10-Aug-2021  rillig lint: fix 3 of the 4 wrong messages about lvalue in initial assignment
 1.5 31-Jul-2021  rillig tests/lint: demonstrate more wrong warnings for const struct members

The code 't_const = false' occurs 4 times in the lint code, each
corresponding to one of the wrong warnings in the test.

This bug has been existing at least since 2001. Back then, the lint
output was:

2001.12.24.20.52.09
| (23): lint error: popctrl() 1
| (15): syntax error [249]
| (19): warning: left operand of 'FARG' must be modifiable lvalue [115]
| (21): syntax error [249]
| (23): warning: function initialize_const_struct_member falls off bottom without returning value [217]
| exit status 1

from 2002.12.06.03.27.39
| (23): lint error: func.c, 168: popctrl()
| (15): warning: left operand of '=' must be modifiable lvalue [115]
| (19): warning: left operand of 'FARG' must be modifiable lvalue [115]
| (21): syntax error [249]
| (23): warning: function initialize_const_struct_member falls off bottom without returning value [217]
| exit status 1
until 2003.10.27.00.12.44
 1.4 31-Jul-2021  rillig tests/lint: demonstrate wrong error message for initialization

Seen in usr.bin/make/var.c:4022 in C99 mode, where a ModChain variable
is initialized and two of the members are const-qualified.
 1.3 17-Jan-2021  rillig lint: add test for incrementing const variable
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 07-Jul-2023  rillig branches: 1.6.2;
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.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.3 09-Jan-2021  rillig lint: add test for 116 "illegal pointer subtraction"
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 09-Jan-2021  rillig lint: add test for 116 "illegal pointer subtraction"
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.16 14-Sep-2025  rillig lint: warn about signed '<<' that ends up exactly in the msb
 1.15 14-Sep-2025  rillig lint: add more type details to several messages

In most expressions, the integer promotions are performed on the
operands, making the actual type different from the "visible" type of an
operand. To properly explain the situation, mention the type before the
integer promotions in case it differs from the resulting type.
 1.14 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.13 29-Jan-2023  rillig lint: don't warn about negative '>>' when the actual value is positive
 1.12 29-Jan-2023  rillig tests/lint: merge tests for '>>'
 1.11 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.10 04-Sep-2021  rillig tests/lint: provide more background information on signed '>>'
 1.9 27-Aug-2021  rillig tests/lint: document correct lint warnings for '>>'

The previous commit contained wrong assumptions. Upon closer
inspection, the lint warning is correct.
 1.8 27-Aug-2021  rillig tests/lint: test wrong warning for bitwise '>>'

Seen in /usr/include/netbt/hci.h, function hci_filter_set.
 1.7 15-Aug-2021  rillig lint: fix wrong warning about 'unsigned char >> constant'
 1.6 15-Aug-2021  rillig tests/lint: demonstrate wrong warning about signed '>>'

Seen in libdes/ostr2key.c(81).
 1.5 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.4 31-Jan-2021  rillig lint: mention the operator in messages about bit shifts
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 09-Jan-2021  rillig lint: add tests for messages 117, 120, 125, 127
 1.1 02-Jan-2021  rillig 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.
 1.11 17-Jun-2022  rillig 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'.
 1.10 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.9 04-Sep-2021  rillig tests/lint: provide more background information on signed '>>'
 1.8 27-Aug-2021  rillig tests/lint: document correct lint warnings for '>>'

The previous commit contained wrong assumptions. Upon closer
inspection, the lint warning is correct.
 1.7 27-Aug-2021  rillig tests/lint: test wrong warning for bitwise '>>'

Seen in /usr/include/netbt/hci.h, function hci_filter_set.
 1.6 15-Aug-2021  rillig lint: fix wrong warning about 'unsigned char >> constant'
 1.5 15-Aug-2021  rillig tests/lint: demonstrate wrong warning about signed '>>'

Seen in libdes/ostr2key.c(81).
 1.4 06-Apr-2021  rillig lint: add details to warning about too large shift amount

The previous message 'shift greater than size of object' was too short
to give reasonable hints, especially when the expressions involve
typedefs or macros.
 1.3 31-Jan-2021  rillig lint: mention the operator in messages about bit shifts
 1.2 09-Jan-2021  rillig lint: add tests for messages 117, 120, 125, 127
 1.1 02-Jan-2021  rillig 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.
 1.9 06-Sep-2025  rillig lint: reword message for bit-shift in trad-C90 migration mode

Mentioning the type names gives a hint about why the behavior differs;
the message only occurs when the type of the shift amount has higher
rank than the type of the shifted value.
 1.8 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.7 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.6 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.5 04-May-2021  rillig tests/lint: make test for message 118 platform-independent
 1.4 06-Apr-2021  rillig lint: for shift in C99 mode, do not warn about difference to pre-C90

C99 is too far away from traditional C to make this warning useful.
There are 3 different situations in which this warning is generated:

For '1 << (unsigned char)1', the result type is 'unsigned int' in
traditional C. The result type is unsigned because at least 1 of the
operators is unsigned, and it is 'unsigned int' because the usual
arithmetic promotions are applied.

For '1 >> (long)1', as well as for '1 << (long)1', the result type is
'long' in traditional C since the usual arithmetic promotions are
applied.

Omitting this warning in C99 mode reduces the amount of lint warnings in
a typical NetBSD release build by approximately 6800 of 107000 total.
 1.3 28-Feb-2021  rillig tests/lint: add test for '<<' in traditional C
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 04-May-2021  rillig tests/lint: make test for message 118 platform-independent
 1.2 28-Feb-2021  rillig tests/lint: add test for '<<' in traditional C
 1.1 02-Jan-2021  rillig 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.
 1.1 06-Sep-2025  rillig lint: reword message for bit-shift in trad-C90 migration mode

Mentioning the type names gives a hint about why the behavior differs;
the message only occurs when the type of the shift amount has higher
rank than the type of the shifted value.
 1.4 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.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 14-Sep-2025  rillig lint: add more type details to several messages

In most expressions, the integer promotions are performed on the
operands, making the actual type different from the "visible" type of an
operand. To properly explain the situation, mention the type before the
integer promotions in case it differs from the resulting type.
 1.7 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.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.4 31-Jan-2021  rillig lint: mention the operator in messages about bit shifts
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 09-Jan-2021  rillig lint: add tests for messages 117, 120, 125, 127
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 06-Apr-2021  rillig lint: add details to warning about too large shift amount

The previous message 'shift greater than size of object' was too short
to give reasonable hints, especially when the expressions involve
typedefs or macros.
 1.3 31-Jan-2021  rillig lint: mention the operator in messages about bit shifts
 1.2 09-Jan-2021  rillig lint: add tests for messages 117, 120, 125, 127
 1.1 02-Jan-2021  rillig 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.
 1.7 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.6 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 06-Apr-2021  rillig lint: test what happens for 'int << double'

I just wanted to see whether typeok_shift would be reached in this case,
to ensure that is_uinteger applies as expected. It does.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 06-Apr-2021  rillig lint: test what happens for 'int << double'

I just wanted to see whether typeok_shift would be reached in this case,
to ensure that is_uinteger applies as expected. It does.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 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.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 06-Apr-2021  rillig lint: add details to warning about too large shift amount

The previous message 'shift greater than size of object' was too short
to give reasonable hints, especially when the expressions involve
typedefs or macros.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 06-Apr-2021  rillig lint: add details to warning about too large shift amount

The previous message 'shift greater than size of object' was too short
to give reasonable hints, especially when the expressions involve
typedefs or macros.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.9 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.8 03-Jun-2023  rillig branches: 1.8.2;
lint: provide more detailed types when operands do not match
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 04-Dec-2021  rillig lint: add quotes around placeholders in message 123
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 17-Jan-2021  rillig lint: add test for ordered comparison between incompatible types
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 17-Jun-2022  rillig 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'.
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 04-Dec-2021  rillig lint: add quotes around placeholders in message 123
 1.4 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 17-Jan-2021  rillig lint: add test for ordered comparison between incompatible types
 1.1 02-Jan-2021  rillig 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.
 1.16 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.15 26-Aug-2023  rillig branches: 1.15.2;
lint: make diagnostics about ANSI C more international
 1.14 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.13 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.12 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.11 14-Aug-2021  rillig lint: use standard quoting style for messages 124 and 184
 1.10 10-Jul-2021  rillig tests/lint: move test for __attribute__ out of msg_124.c

That test case didn't belong there since there was no chance of getting
an 'illegal pointer combination' by applying an operator.
 1.9 13-Apr-2021  christos add a test for a type attribute after a param function pointer
 1.8 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.7 15-Feb-2021  rillig tests/lint: fix comments in test for message 124
 1.6 24-Jan-2021  rillig lint: fix wrong warning about null pointer comparison
 1.5 24-Jan-2021  rillig lint: demonstrate wrong 124 for flipped == as well

Since the fix in the next commit changes two places in the code, there
must be two wrong error messages that disappear then.
 1.4 24-Jan-2021  rillig lint: demonstrate wrong 124 due to bug in is_typeok_eq
 1.3 24-Jan-2021  rillig lint: document bug in typeok_eq

Since rt is an alias for rn->tn_type->t_tspec, it cannot be PTR and VOID
at the same time. This makes the condition unsatisfiable. Removing
that part of the code didn't show any change in behavior, as expected.

It may even be that fixing this obvious bug doesn't show any change in
behavior since that function is only used in a single place and
check_pointer_comparison performs its own checks before issuing any
warning.

At least the test cases added to msg_124.c all run as expected.
 1.2 03-Jan-2021  rillig lint: add test for message 124 "illegal pointer combination"

The message may be correct, but it is not helpful in any way. There are
just too many function pointers that may differ in a very small detail.

Before tyname.c 1.20 from 2021-01-02, the string representation of type
names was often limited to only 63 characters. Because of this, it made
sense to omit any detail that could need more space than this. Now that
this limitation is gone, it's reasonable to add more detail to the type
information, especially since that information is readily available.
 1.1 02-Jan-2021  rillig 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.
 1.15.2.1 02-Aug-2025  perseant Sync with HEAD
 1.13 17-Jun-2022  rillig 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'.
 1.12 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.11 14-Aug-2021  rillig lint: use standard quoting style for messages 124 and 184
 1.10 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.9 24-Jan-2021  rillig lint: fix wrong warning about null pointer comparison
 1.8 24-Jan-2021  rillig lint: demonstrate wrong 124 for flipped == as well

Since the fix in the next commit changes two places in the code, there
must be two wrong error messages that disappear then.
 1.7 24-Jan-2021  rillig lint: demonstrate wrong 124 due to bug in is_typeok_eq
 1.6 24-Jan-2021  rillig lint: document bug in typeok_eq

Since rt is an alias for rn->tn_type->t_tspec, it cannot be PTR and VOID
at the same time. This makes the condition unsatisfiable. Removing
that part of the code didn't show any change in behavior, as expected.

It may even be that fixing this obvious bug doesn't show any change in
behavior since that function is only used in a single place and
check_pointer_comparison performs its own checks before issuing any
warning.

At least the test cases added to msg_124.c all run as expected.
 1.5 05-Jan-2021  rillig lint: clean up symbolic operator names that are used in the messages

Including the "p" in the symbolic operator names was questionable, for
several reasons:

1. The "p" could be taken to mean an actual variable name, which is
confusing if the function doesn't have such a variable, or even more
so if the line contains an unrelated variable called "p".

2. For the binary operators, having the "p" mentioned on both sides of
the operator (such as in "p + p") wrongly suggested that both
operands of the expression were the same.

3. The name "p" often stands for a pointer. Most of the operators
don't accept pointers, therefore the name was misleading.

For these reasons, the "p" was removed from the symbolic name of all
operators. This makes several pairs of operators indistinguishable:

INCBEF == INCAFT
DECBEF == DECAFT
UPLUS == PLUS
UMINUS == MINUS
STAR == MULT
AMPER == AND

This is not expected to create any confusion since C programmers are
expected to know these double meanings.

The symbolic names for SHLASS and SHRASS were missing the '=' before.
This was added since omitting it was probably an oversight.
 1.4 03-Jan-2021  rillig lint: add detailed type information for functions
 1.3 03-Jan-2021  rillig lint: add type information to message 124 "illegal pointer combination"
 1.2 03-Jan-2021  rillig lint: add test for message 124 "illegal pointer combination"

The message may be correct, but it is not helpful in any way. There are
just too many function pointers that may differ in a very small detail.

Before tyname.c 1.20 from 2021-01-02, the string representation of type
names was often limited to only 63 characters. Because of this, it made
sense to omit any detail that could need more space than this. Now that
this limitation is gone, it's reasonable to add more detail to the type
information, especially since that information is readily available.
 1.1 02-Jan-2021  rillig 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.
 1.6 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 09-Jan-2021  rillig lint: add tests for messages 117, 120, 125, 127
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 09-Jan-2021  rillig lint: add tests for messages 117, 120, 125, 127
 1.1 02-Jan-2021  rillig 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.
 1.9 09-Dec-2024  rillig tests/lint: test more cases of type mismatch in '?:'
 1.8 06-Aug-2023  rillig branches: 1.8.2;
lint: since C99, a non-void function must return a value
 1.7 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.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.4 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 17-Jun-2022  rillig 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'.
 1.7 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.6 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.5 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 17-Jan-2021  rillig lint: add type information to message 126
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 10-Mar-2025  rillig lint: in C99 mode and later, warn about non-prototype functions

Suggested by Christos Zoulas.
 1.5 24-Feb-2025  rillig lint: remove no-op variant of the unary '&' operator

Neither K&R 1978 nor any of the C standards mentions that &function or
&array would be a no-op. This no-op behavior produced wrong warnings in
sbin/gpt.
 1.4 16-Jun-2022  rillig branches: 1.4.4;
tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 09-Jan-2021  rillig lint: add tests for messages 117, 120, 125, 127
 1.1 02-Jan-2021  rillig 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.
 1.4.4.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 03-Jul-2021  rillig lint: do not define 'long double' GCC builtins for traditional C
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 09-Jan-2021  rillig lint: add tests for messages 117, 120, 125, 127
 1.1 02-Jan-2021  rillig 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.
 1.10 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.9 23-Nov-2024  rillig lint: add details to messages about discarding qualifiers

The related message 153 is left as-is, as it is used in two places, and
the second place is not only about discarded qualifiers.
 1.8 28-Jan-2024  rillig branches: 1.8.2;
tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.7 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.6 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 16-Mar-2021  rillig tests/lint: add test for message 128 about incompatible pointers
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 16-Mar-2021  rillig tests/lint: add test for message 128 about incompatible pointers
 1.1 02-Jan-2021  rillig 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.
 1.11 17-Sep-2025  rillig lint: answer two questions from the code by writing tests for them
 1.10 29-Oct-2024  rillig lint: fix warning about null effect in GCC statement expressions
 1.9 29-Oct-2024  rillig tests/lint: demonstrate wrong warning about 'null effect'

Seen in sys/timevar.h:250 and other places.
 1.8 02-Aug-2023  rillig branches: 1.8.2;
lint: distinguish between arguments and parameters
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 21-Aug-2021  rillig lint: do not warn about '(void)arg' and similar expressions

In the current NetBSD build, 5260 of the 46264 total lint warnings are
about expressions that have a null effect. Most of these occurrences
follow well-established patterns, which makes the warnings bogus.
Remove these warnings.
 1.4 21-Aug-2021  rillig tests/lint: demonstrate wrong warnings for 'null effect' expressions
 1.3 30-Jan-2021  rillig lint: fix wrong 'expression has null effect'
 1.2 30-Jan-2021  rillig lint: add test for 129, possibly demonstrating a bug in lint
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 17-Jun-2022  rillig 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'.
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 21-Aug-2021  rillig lint: do not warn about '(void)arg' and similar expressions

In the current NetBSD build, 5260 of the 46264 total lint warnings are
about expressions that have a null effect. Most of these occurrences
follow well-established patterns, which makes the warnings bogus.
Remove these warnings.
 1.4 21-Aug-2021  rillig tests/lint: demonstrate wrong warnings for 'null effect' expressions
 1.3 30-Jan-2021  rillig lint: fix wrong 'expression has null effect'
 1.2 30-Jan-2021  rillig lint: add test for 129, possibly demonstrating a bug in lint
 1.1 02-Jan-2021  rillig 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.
 1.17 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.16 28-Mar-2023  rillig branches: 1.16.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.15 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.14 25-May-2021  rillig tests/lint: make test 130 platform-independent

On 32-bit platforms such as i386 and sparc, sizeof(int) == sizeof(long),
which produced an additional unintended lint error message:

msg_130.c(78): error: duplicate case in switch: 4 [199]
 1.13 02-Apr-2021  rillig branches: 1.13.2;
tests/lint: add test for enum type mismatch
 1.12 21-Mar-2021  rillig lint: fix reachability for if-then-else statements
 1.11 10-Mar-2021  rillig lint: disable check for enum type mismatch in switch statement

This check has been too quick and broke the lint build. Among others,
lib/libpuffs has -w included in LINTFLAGS, which means that the build
can fail even for new warnings, not only for errors.

libpuffs compares a uint16_t with constants from an unnamed enum type.
Since the enum type is completely unnamed (neither a tag nor a typedef),
there is no way to define a struct member having this type. This was a
scenario that I just didn't consider when I added the check to lint.

For now, disable the new check completely. The previously existing lint
checks stay enabled, including the one that warns about mismatched
anonymous enum types in the '==' operator, which is very similar to the
now disabled check.
 1.10 09-Mar-2021  rillig tests/lint: add example for anonymous enum type in switch expression
 1.9 09-Mar-2021  rillig tests/lint: add tests for comparison between unnamed enums

Since unnamed enum types cannot be used in type casts, there is no
sensible way that this type mismatch could be resolved, without changing
the definition of the enum type itself, but that may be in a
non-modifiable header.

Therefore, comparisons with enum constants of unnamed types cannot be
sensibly warned about.
 1.8 05-Mar-2021  rillig lint: warn about enum/enum or enum/int type mismatch in switch

This is something that neither GCC 10 nor Clang 8 do, even though it
seems useful. Lint didn't do it up to now, but that was probably an
oversight since it is easy to miss the implicit '==' operator in the
switch statement.
 1.7 05-Mar-2021  rillig tests/lint: mark tests for messages 130 and 241 as related
 1.6 05-Mar-2021  rillig tests/lint: add test for incompatible enums in switch

Neither lint nor GCC 10 nor Clang 8 have a warning for an enum type
mismatch in a switch statement.

GCC 10 issues a warning but completely misses the point of the
mismatched enum types. It only warns because in this test, EVENING has
the numeric value 3, which is out of bounds for enum color, where the
valid range is from 0 to 2. It says:

> msg_130.c:45:2: warning:
> case value ‘3’ not in enumerated type ‘enum color’ [-Wswitch]

Clang 8 behaves almost the same, it just doesn't mention the value of
the constant, saying merely 'case value not in enumerated type'.
 1.5 28-Feb-2021  rillig lint: add type information to enum type mismatch
 1.4 27-Feb-2021  rillig tests/lint: add more tests for enum mismatch
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.13.2.1 31-May-2021  cjep sync with head
 1.16.2.1 02-Aug-2025  perseant Sync with HEAD
 1.12 17-Jun-2022  rillig 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'.
 1.11 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.10 21-Mar-2021  rillig lint: fix reachability for if-then-else statements
 1.9 10-Mar-2021  rillig lint: disable check for enum type mismatch in switch statement

This check has been too quick and broke the lint build. Among others,
lib/libpuffs has -w included in LINTFLAGS, which means that the build
can fail even for new warnings, not only for errors.

libpuffs compares a uint16_t with constants from an unnamed enum type.
Since the enum type is completely unnamed (neither a tag nor a typedef),
there is no way to define a struct member having this type. This was a
scenario that I just didn't consider when I added the check to lint.

For now, disable the new check completely. The previously existing lint
checks stay enabled, including the one that warns about mismatched
anonymous enum types in the '==' operator, which is very similar to the
now disabled check.
 1.8 09-Mar-2021  rillig tests/lint: add example for anonymous enum type in switch expression
 1.7 09-Mar-2021  rillig tests/lint: add tests for comparison between unnamed enums

Since unnamed enum types cannot be used in type casts, there is no
sensible way that this type mismatch could be resolved, without changing
the definition of the enum type itself, but that may be in a
non-modifiable header.

Therefore, comparisons with enum constants of unnamed types cannot be
sensibly warned about.
 1.6 05-Mar-2021  rillig lint: warn about enum/enum or enum/int type mismatch in switch

This is something that neither GCC 10 nor Clang 8 do, even though it
seems useful. Lint didn't do it up to now, but that was probably an
oversight since it is easy to miss the implicit '==' operator in the
switch statement.
 1.5 05-Mar-2021  rillig tests/lint: mark tests for messages 130 and 241 as related
 1.4 28-Feb-2021  rillig lint: add type information to enum type mismatch
 1.3 27-Feb-2021  rillig tests/lint: add more tests for enum mismatch
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.56 14-Sep-2025  rillig lint: warn about signed '<<' that ends up exactly in the msb
 1.55 14-Sep-2025  rillig lint: add more type details to several messages

In most expressions, the integer promotions are performed on the
operands, making the actual type different from the "visible" type of an
operand. To properly explain the situation, mention the type before the
integer promotions in case it differs from the resulting type.
 1.54 08-Jul-2025  rillig lint: reword message about 'extra bits set to 0'

The word 'extra' in the previous wording was too unspecific to make
sense of. In the reworded message, focus on the problem instead of
mentioning only the effect.
 1.53 03-Jan-2025  rillig tests/lint: move a platform-specific test

The test failed on i386, as ptrdiff_t fits in a uint32_t after
conversion, thus not generating a warning.
 1.52 02-Jan-2025  rillig lint: fix possible loss of accuracy in multiplication and division
 1.51 02-Jan-2025  rillig lint: fix assertion failure in pointer subtraction
 1.50 02-Jan-2025  rillig lint: fix a few wrong warnings about possible loss of accuracy
 1.49 02-Jan-2025  rillig lint: compute integer constraints for xor and minus

These operators allow lint to correctly track the possible values in
expressions that sign-extend an integer.
 1.48 01-Jan-2025  rillig lint: fix wrong warning about possible loss of accuracy

The expression "'0' + random() % 10" always fits in a signed or unsigned
char.
 1.47 01-Jan-2025  rillig tests/lint: demonstrate wrong warnings for 'char = int + long'
 1.46 12-Oct-2024  rillig lint: reduce wrong warnings about loss of accuracy in signed '%'
 1.45 12-Oct-2024  rillig tests/lint: extend test for integer constraints
 1.44 08-Oct-2024  rillig lint: compute integer constraints for unsigned multiplication

This fixes the wrong warning about possible loss of accuracy in
libc/c16rtomb.
 1.43 08-Oct-2024  rillig tests/lint: test integer constraint on multiplication
 1.42 18-Aug-2024  rillig lint: add value propagation for '/' combined with bit operations

Fixes __SHIFTIN/__SHIFTOUT expressions, as in PR toolchain/58617.
 1.41 18-Aug-2024  rillig tests/lint: demonstrate wrong warning about accuracy loss

Demonstrates PR toolchain/58617.
 1.40 01-May-2024  rillig branches: 1.40.2;
lint: fix warning about out-of-bounds bit-field value
 1.39 01-May-2024  rillig lint: demonstrate wrong warning about out-of-range bit-field
 1.38 25-Mar-2024  rillig lint: fix warnings about loss of accuracy on bit-field operations
 1.37 25-Mar-2024  rillig tests/lint: demonstrate wrong warnings about lossy bit field operations
 1.36 12-Mar-2024  rillig tests/lint: extend test for previously wrong warning about bit-fields
 1.35 12-Mar-2024  rillig lint: fix warning about loss of conversion for unsigned bit-fields

Since decl.c 1.180 from 2021-05-02.
 1.34 12-Mar-2024  rillig tests/lint: demonstrate wrong warning when comparing a bit-field

Since decl.c 1.180 from 2021-05-02, which allowed arbitrary integer
types to be used as the underlying type for bit-fields in GCC mode.
 1.33 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.32 06-Aug-2023  rillig lint: since C99, a non-void function must return a value
 1.31 03-Jun-2023  rillig lint: provide more detailed types when operands do not match
 1.30 09-May-2023  rillig lint: track integer constraints through conditional expressions
 1.29 09-May-2023  rillig lint: preserve integer constraints on cast
 1.28 09-May-2023  rillig tests/lint: demonstrate wrong warning about loss of accuracy
 1.27 09-May-2023  rillig tests/lint: demonstrate wrong warning about losing accuracy
 1.26 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.25 29-Jan-2023  rillig tests/lint: merge tests for '>>'
 1.24 07-Jul-2022  rillig tests/lint: document why in ic_expr, '&' does not need before_conversion
 1.23 06-Jul-2022  rillig lint: do not warn about 'may lose accuracy' in safe cases of '%'

The possible values of the expression 'a % b' for unsigned integers lie
between 0 and (b - 1). For signed integers, it's more complicated, so
ignore them for now.
 1.22 06-Jul-2022  rillig tests/lint: test 'may lose accuracy' for '%'

For unsigned integers, the possible range of the result can be narrowed
down by looking at the right operand of the '%'. Right now, lint
doesn't do this though.
 1.21 03-Jul-2022  rillig lint: include the width of bit-fields in the type name
 1.20 02-Jul-2022  rillig tests/lint: test bit shift with large integer types

build_bit_shift converts the right-hand operand to INT or UINT, even
though C11 6.5.7 doesn't say anything about narrowing conversions.

Traditional C says that the operators '<<' and '>>' perform the usual
arithmetic conversions. This has been dropped in C90.

What lint actually does is something completely different. In the
operators table in ops.def, the operators '<<' and '>>' are not marked
as performing the usual arithmetic conversions (column 'balance'). This
leaves all conversions to 'build_bit_shift', which converts the
right-hand side to INT or UINT. There is no obvious reason for this
conversion, as the bounds checks need to be performed no matter whether
the type is INT or UINT128.
 1.19 19-Jun-2022  rillig lint: add quotes around placeholders in 4 messages
 1.18 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.17 10-Jun-2022  rillig 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.
 1.16 30-May-2022  rillig lint: fix assertion failure in '(unsigned long)(ptr) >> 12'

Since tree.c 1.449 from 2022-05-26.
 1.15 29-May-2022  rillig lint: fix wrong errors about sizeof of a bit-field (since 2022-05-26)
 1.14 29-May-2022  rillig tests/lint: demonstrate wrong errors 'size/alignment of bit-field'

Since tree.c 1.444 from 2022-05-26, which added range and bit checks for
integer expressions, not taking into account that querying for the size
of a bit-field type triggers an error message.
 1.13 26-May-2022  rillig lint: do not warn about 'uint32_t = uint64_t >> 32'

If all possible values fit into the destination type, there is no
possibility of losing accuracy.

Enhances PR 36668.
 1.12 26-May-2022  rillig tests/lint: demonstrate wrong warnings about loss of accuracy
 1.11 26-May-2022  rillig lint: do not warn about loss in accuracy if the actual value fits

The expression 'any & 0xff' can always be assigned to 'uint8_t' without
loss of any value bits. In the same way, '(any & 0xff) << 8' can always
be assigned to 'uint16_t'.

Previously, lint warned about these cases. Fix these wrong warnings by
tracking the possible values of integer expressions across a single
expression.

Fixes PR 36668, so that <sys/endian.h> does not need to be cluttered
with useless casts anymore.
 1.10 26-May-2022  rillig tests/lint: demonstrate wrong 'may lose accuracy' warning

Reported in PR 36668, fixed in sys/sys/endian.h 1.26 from 2007-07-20,
unfixed in sys/sys/endian.h 1.29 from 2014-03-18.
 1.9 21-Apr-2022  rillig tests/lint: extend test for lossy integer conversion
 1.8 20-Apr-2022  rillig tests/lint: fix test for message 132 to be platform-independent

On i386, the test failed because the warning in line 101 was not
generated. This was because size_t on i386 is unsigned int (see
arch/i386/targparam.h, SIZEOF_TSPEC). The result of the multiplication
had type unsigned int, and message 132 does not trigger for a conversion
from unsigned int to signed int because both types have the same size
(see check_integer_conversion, portable_size_in_bits).

Change the involved type from size_t (which the original code used) to
unsigned long long (which is uint64_t on all platforms supported by
lint), so that the warning is generated on all platforms in the same
way.
 1.7 19-Apr-2022  rillig tests/lint: add test case for integer non-constant expression

Seen in sqlite3.c.
 1.6 25-Aug-2021  rillig tests/lint: test conversion from long long to intptr_t on ilp32

Seen in usr.bin/make/var.c:1608.
 1.5 06-Apr-2021  rillig lint: fix wrong warning about losing accuracy when converting to _Bool
 1.4 06-Apr-2021  rillig tests/lint: demonstrate wrong warning about losing accuracy
 1.3 28-Feb-2021  rillig tests/lint: add test for narrowing conversions

Lint can warn about narrowing conversions, it just doesn't do so by
default.

The option -a (which is included in the default LINTFLAGS in sys.mk)
only reports narrowing conversions from 'long' or larger. To get
warnings about all possible narrowing conversions, the option -a has to
be given more than once.

PR bin/14531
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.40.2.1 02-Aug-2025  perseant Sync with HEAD
 1.18 17-Jun-2022  rillig 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'.
 1.17 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.16 10-Jun-2022  rillig 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.
 1.15 30-May-2022  rillig lint: fix assertion failure in '(unsigned long)(ptr) >> 12'

Since tree.c 1.449 from 2022-05-26.
 1.14 29-May-2022  rillig lint: fix wrong errors about sizeof of a bit-field (since 2022-05-26)
 1.13 29-May-2022  rillig tests/lint: demonstrate wrong errors 'size/alignment of bit-field'

Since tree.c 1.444 from 2022-05-26, which added range and bit checks for
integer expressions, not taking into account that querying for the size
of a bit-field type triggers an error message.
 1.12 26-May-2022  rillig lint: do not warn about 'uint32_t = uint64_t >> 32'

If all possible values fit into the destination type, there is no
possibility of losing accuracy.

Enhances PR 36668.
 1.11 26-May-2022  rillig tests/lint: demonstrate wrong warnings about loss of accuracy
 1.10 26-May-2022  rillig lint: do not warn about loss in accuracy if the actual value fits

The expression 'any & 0xff' can always be assigned to 'uint8_t' without
loss of any value bits. In the same way, '(any & 0xff) << 8' can always
be assigned to 'uint16_t'.

Previously, lint warned about these cases. Fix these wrong warnings by
tracking the possible values of integer expressions across a single
expression.

Fixes PR 36668, so that <sys/endian.h> does not need to be cluttered
with useless casts anymore.
 1.9 26-May-2022  rillig tests/lint: demonstrate wrong 'may lose accuracy' warning

Reported in PR 36668, fixed in sys/sys/endian.h 1.26 from 2007-07-20,
unfixed in sys/sys/endian.h 1.29 from 2014-03-18.
 1.8 21-Apr-2022  rillig tests/lint: extend test for lossy integer conversion
 1.7 20-Apr-2022  rillig tests/lint: fix test for message 132 to be platform-independent

On i386, the test failed because the warning in line 101 was not
generated. This was because size_t on i386 is unsigned int (see
arch/i386/targparam.h, SIZEOF_TSPEC). The result of the multiplication
had type unsigned int, and message 132 does not trigger for a conversion
from unsigned int to signed int because both types have the same size
(see check_integer_conversion, portable_size_in_bits).

Change the involved type from size_t (which the original code used) to
unsigned long long (which is uint64_t on all platforms supported by
lint), so that the warning is generated on all platforms in the same
way.
 1.6 19-Apr-2022  rillig tests/lint: add test case for integer non-constant expression

Seen in sqlite3.c.
 1.5 25-Aug-2021  rillig tests/lint: test conversion from long long to intptr_t on ilp32

Seen in usr.bin/make/var.c:1608.
 1.4 06-Apr-2021  rillig lint: fix wrong warning about losing accuracy when converting to _Bool
 1.3 06-Apr-2021  rillig tests/lint: demonstrate wrong warning about losing accuracy
 1.2 28-Feb-2021  rillig tests/lint: add test for narrowing conversions

Lint can warn about narrowing conversions, it just doesn't do so by
default.

The option -a (which is included in the default LINTFLAGS in sys.mk)
only reports narrowing conversions from 'long' or larger. To get
warnings about all possible narrowing conversions, the option -a has to
be given more than once.

PR bin/14531
 1.1 02-Jan-2021  rillig 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.
 1.5 08-Aug-2023  rillig lint: in -a mode, do not warn about integer conversions from 'int'

Since tree.c 1.552 from 2023-07-08, lint warned about integer
conversions from 'int' or 'unsigned int' to smaller integer types. This
only affected 32-bit platforms where size_t is 'unsigned int' rather
than 'unsigned long', as on these platforms, the integer ranks of 'int'
and 'long' are the same, see INT_RANK in inittyp.c.

Discovered by lib/libkvm, which fails on i386 when lint generates any
warnings.
 1.4 08-Aug-2023  rillig tests/lint: test integer conversions on ilp32 int platforms
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 10-Jun-2022  rillig 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.
 1.1 25-Aug-2021  rillig tests/lint: test conversion from long long to intptr_t on ilp32

Seen in usr.bin/make/var.c:1608.
 1.2 17-Jun-2022  rillig 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'.
 1.1 25-Aug-2021  rillig tests/lint: test conversion from long long to intptr_t on ilp32

Seen in usr.bin/make/var.c:1608.
 1.3 03-Jan-2025  rillig tests/lint: move a platform-specific test

The test failed on i386, as ptrdiff_t fits in a uint32_t after
conversion, thus not generating a warning.
 1.2 07-Jul-2023  rillig branches: 1.2.2;
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.1 10-Jun-2022  rillig 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.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 17-Jun-2022  rillig 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'.
 1.1 10-Jun-2022  rillig 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.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.17 21-Mar-2025  rillig lint: don't warn when a cast increases the alignment from 1 to n
 1.16 21-Mar-2025  rillig tests/lint: demonstrate questionable warning about alignment
 1.15 23-Apr-2023  rillig branches: 1.15.2;
tests/lint: add rationale for not warning about alignment problems
 1.14 22-Apr-2023  rillig lint: allow cast from a type to a union containing that type
 1.13 22-Apr-2023  rillig tests/lint: test cast to union with stricter alignment
 1.12 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.11 16-Jul-2022  rillig lint: add more details to message about pointer alignment

The previous message 'may cause alignment problem' was not detailed
enough to be actionable, it didn't give the necessary insight to why
lint was complaining at all.

The new message 'increases alignment from 1 to 4' or 'from 2 to 8'
describes the potentially problematic conversion, and together with the
involved type names, it allows an informed decision about whether lint's
warning is warranted or not.

In a typical NetBSD build, this warning is in the top 10. The number of
these warnings depends on the architecture, it is typically between 800
and 1600.
 1.10 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.9 15-Jul-2021  rillig lint: allow pointer casts from 'char *' and 'unsigned char *'

For the sake of traditional code that did not yet migrate to using 'void
*' for arbitrary pointers.

In the standard NetBSD build, this reduces the number of lint warnings
by around 7000, of 57000 total.
 1.8 15-Jul-2021  rillig tests/lint: demonstrate questionable warnings for pointer casts
 1.7 17-Apr-2021  rillig lint: do not warn about alignment when casting from incomplete struct

This removes a bunch of technically correct but practically useless
warnings from the regular NetBSD build.
 1.6 17-Apr-2021  rillig tests/lint: add test for pointer cast from incomplete struct
 1.5 28-Feb-2021  rillig tests/lint: force 'expect' annotations
 1.4 28-Feb-2021  rillig lint: add type information to 'possible pointer alignment problem [135]'

This warning occurs more than 7400 times in a regular NetBSD build, and
without giving any type information, leaves the reader clueless about
what the underlying issue might be. Add type information since that is
a no-brainer to implement.
 1.3 28-Feb-2021  rillig tests/lint: add test for 'possible pointer alignment problem [135]'
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.15.2.1 02-Aug-2025  perseant Sync with HEAD
 1.9 17-Jun-2022  rillig 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'.
 1.8 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.7 15-Jul-2021  rillig lint: allow pointer casts from 'char *' and 'unsigned char *'

For the sake of traditional code that did not yet migrate to using 'void
*' for arbitrary pointers.

In the standard NetBSD build, this reduces the number of lint warnings
by around 7000, of 57000 total.
 1.6 15-Jul-2021  rillig tests/lint: demonstrate questionable warnings for pointer casts
 1.5 17-Apr-2021  rillig lint: do not warn about alignment when casting from incomplete struct

This removes a bunch of technically correct but practically useless
warnings from the regular NetBSD build.
 1.4 17-Apr-2021  rillig tests/lint: add test for pointer cast from incomplete struct
 1.3 28-Feb-2021  rillig lint: add type information to 'possible pointer alignment problem [135]'

This warning occurs more than 7400 times in a regular NetBSD build, and
without giving any type information, leaves the reader clueless about
what the underlying issue might be. Add type information since that is
a no-brainer to implement.
 1.2 28-Feb-2021  rillig tests/lint: add test for 'possible pointer alignment problem [135]'
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.6 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.5 01-Jul-2022  rillig lint: add quotes around operator in message 138, remove message 240

Message 138 doesn't occur in practice, it was the last one that was
missing the quotes around the placeholder.

Message 240 was also missing the quotes, but it was not reachable. There
was also no apparent benefit in warning about 'assignment of different
structures' when the message about 'assignment type mismatch' serves the
same purpose.
 1.4 01-Jul-2022  rillig tests/lint: add tests for accessing incomplete types
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 16-Mar-2021  rillig tests/lint: add test for message 139 about division by zero
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 16-Mar-2021  rillig tests/lint: add test for message 139 about division by zero
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.17 27-Mar-2024  rillig lint: clean up; extend overflow test
 1.16 10-Mar-2024  rillig lint: add details to the message about integer overflow

Having only the operator was too unspecific to be actionable, so add the
actual numbers and the data type.
 1.15 10-Mar-2024  rillig lint: fix integer overflow detection

Previously, an unsigned operation that had a negative result went
undetected in a few cases. Now, all results that are not representable
by their type are considered overflows.

The implementation of signed shift-right had been wrong for a few
commits.
 1.14 10-Mar-2024  rillig lint: detect more cases of integer overflow in constant expressions

For unsigned integers, detect when 'a + b' wraps around.
 1.13 10-Mar-2024  rillig lint: remove wrong warning about overflow in unary '-' for unsigned
 1.12 10-Mar-2024  rillig lint: fix integer overflow in integer overflow check
 1.11 10-Mar-2024  rillig tests/lint: test integer overflow when folding constants

The test is still incomplete, yet it has discovered several bugs that
are worth fixing.
 1.10 11-Jan-2024  rillig lint: warn about integer overflow when folding constant INT_MIN / -1
 1.9 08-Jan-2024  rillig tests/lint: fix overflow test for 32-bit platforms (since yesterday)

Plain integer constants without suffix are first tried to fit into
'int', then 'long', but not 'long long'. This means that numbers larger
than 32 bits must be written with the LL suffix.
 1.8 07-Jan-2024  rillig tests/lint: test operators, integer overflow, conversions
 1.7 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 23-Aug-2021  rillig lint: add quotes around placeholder in message 141
 1.4 23-Aug-2021  rillig lint: fix wrong warning about signed integer overflow in '-'

The newly added test cases in line 30 and 33 may or may not be worth a
warning since the expressions deal with unsigned integers, where the
behavior on overflow is well defined.
 1.3 23-Aug-2021  rillig tests/lint: demonstrate wrong warnings for integer overflow
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 23-Aug-2021  rillig lint: add quotes around placeholder in message 141
 1.4 23-Aug-2021  rillig lint: fix wrong warning about signed integer overflow in '-'

The newly added test cases in line 30 and 33 may or may not be worth a
warning since the expressions deal with unsigned integers, where the
behavior on overflow is well defined.
 1.3 23-Aug-2021  rillig tests/lint: demonstrate wrong warnings for integer overflow
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.12 08-Jun-2024  rillig tests/lint: remove unused lint1-skip-if selector
 1.11 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.10 11-Apr-2023  rillig lint: don't wrongly warn about overflow in complex constants

Seen in lib/libm.
 1.9 10-Apr-2023  rillig tests/lint: demonstrate wrong warning with complex numbers
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 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.6 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.5 13-Jul-2021  rillig tests/lint: skip test for floating point overflow on alpha

On alpha and a few other platforms (see t_integration.sh), 'long double'
has 128 bit, which under IEEE 754 rules means a decimal exponent of up
to 4932.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 13-Jul-2021  rillig tests/lint: skip test for floating point overflow on alpha

On alpha and a few other platforms (see t_integration.sh), 'long double'
has 128 bit, which under IEEE 754 rules means a decimal exponent of up
to 4932.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 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.5 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.4 02-Apr-2021  rillig lint: add parentheses after sizeof, as required by share/misc/style

No functional change.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 25-Jul-2021  rillig lint: add type information to message about invalid cast

This probably doesn't matter in practice since the compiler is supposed
to catch this kind of error. Adding the type information mainly ensures
that parsing abstract type names works as specified.
 1.3 25-Jul-2021  rillig tests/lint: test function types and pointer arithmetic
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 25-Jul-2021  rillig lint: add type information to message about invalid cast

This probably doesn't matter in practice since the compiler is supposed
to catch this kind of error. Adding the type information mainly ensures
that parsing abstract type names works as specified.
 1.3 25-Jul-2021  rillig tests/lint: test function types and pointer arithmetic
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 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.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 02-Aug-2023  rillig lint: fix plural form in message 150
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.8 17-Jun-2022  rillig 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'.
 1.7 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.6 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.5 13-Jul-2021  rillig lint: fix wording of message for incomplete struct (2021-07-04)

A struct member is not an argument. In err.c 1.124 from 2021-07-04, the
wording had been changed, without noticing that the message was used
twice: once for an argument, once for a struct member.
 1.4 04-Jul-2021  rillig lint: improve wording for incomplete struct or union
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.12 04-May-2025  rillig lint: add more details to message about discarding qualifiers

The name of the function (or, if not available, its type) is useful in
lines that contain more than one function call.
 1.11 24-Feb-2025  rillig lint: remove no-op variant of the unary '&' operator

Neither K&R 1978 nor any of the C standards mentions that &function or
&array would be a no-op. This no-op behavior produced wrong warnings in
sbin/gpt.
 1.10 24-Feb-2025  rillig tests/lint: add tests for constants, pointers and lost bits
 1.9 23-Nov-2024  rillig lint: use separate message when discarding a qualifier in call
 1.8 23-Nov-2024  rillig lint: add details to messages about discarding qualifiers

The related message 153 is left as-is, as it is used in two places, and
the second place is not only about discarded qualifiers.
 1.7 28-Mar-2023  rillig branches: 1.7.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 28-Feb-2021  rillig tests/lint: force 'expect' annotations
 1.4 28-Feb-2021  rillig lint: make messages for incompatible pointers more specific

Message 153 didn't state obviously which of the pointer types was the
one before conversion (or cast) and which was the resulting type.

Message 229 didn't have any type information at all.
 1.3 28-Feb-2021  rillig tests/lint: add tests for function pointers
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 28-Feb-2021  rillig lint: make messages for incompatible pointers more specific

Message 153 didn't state obviously which of the pointer types was the
one before conversion (or cast) and which was the resulting type.

Message 229 didn't have any type information at all.
 1.2 28-Feb-2021  rillig tests/lint: add tests for function pointers
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 28-Mar-2023  rillig branches: 1.6.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.12 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.11 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.10 01-Apr-2022  rillig lint: improve determination of abstract typename

Still not perfect, but at least a step in the right direction. See
decl_direct_abstract.c for the missing edge cases.

See PR#22119.
 1.9 30-Jun-2021  rillig lint: mention the name of an implicitly declared function

In the regular NetBSD builds, this happened in swab.c:65. That line
contains __predict_false, which may or may not be a macro. In other
cases, there may be more than one function call in a single line.
 1.8 30-Jun-2021  rillig tests/lint: add test for type name of enum converted to int
 1.7 28-Jun-2021  rillig lint: in C99 mode, complain about implicitly declared functions

C99, foreword, p5, item 22 lists among the major changes from C90:
"remove implicit function declaration".
 1.6 28-Jun-2021  rillig lint: fix parse error for type 'void (*)[*]'
 1.5 28-Jun-2021  rillig lint: fix type name for prototype function without parameters
 1.4 28-Jun-2021  rillig lint: add type information to message 155 (type mismatch)
 1.3 28-Jun-2021  rillig lint: turn null pointer dereference into assertion failure

Originally I only needed a message that would output the type name from
an abstract-declarator (C99 6.7.6), to see whether lint interprets the
types correctly.

Message 155 looked like a good candidate, but it only revealed more
incomplete and untested code in lint.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.13 17-Jun-2022  rillig 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'.
 1.12 01-Apr-2022  rillig lint: improve determination of abstract typename

Still not perfect, but at least a step in the right direction. See
decl_direct_abstract.c for the missing edge cases.

See PR#22119.
 1.11 29-Aug-2021  rillig lint: in C99 mode, make implicit function declarations an error

In tree.c 1.294 from 2021-06-28, I had already tried this, but at that
time, there were too many implicit function definitions in the NetBSD
tree. Most of them were GCC builtins, which lint did not recognize.
Therefore I had to revert to a warning in tree.c 1.302 from 2021-06-30.

In the meantime, lint has learnt to recognize compiler builtins, see
is_compiler_builtin, so try again now. The build logs from x86_64,
i386, sparc and sparc64 show no more implicit function declarations.
 1.10 30-Jun-2021  rillig lint: in C99 mode, only warn about implicit function declarations

Since tree.c 1.294 from 2021-06-28 (two days ago), lint errored out on
an implicit function declaration. In principle it is correct to do so
since C99 requires it, but in practice there are a several functions
that are not declared in the translation unit itself since they are
provided by the compiler. Typical examples for GCC and Clang are the
various functions named '__builtin_*' and '__atomic_*'.

For now, only warn about these but don't error out.
 1.9 30-Jun-2021  rillig lint: mention the name of an implicitly declared function

In the regular NetBSD builds, this happened in swab.c:65. That line
contains __predict_false, which may or may not be a macro. In other
cases, there may be more than one function call in a single line.
 1.8 30-Jun-2021  rillig tests/lint: add test for type name of enum converted to int
 1.7 28-Jun-2021  rillig lint: in C99 mode, complain about implicitly declared functions

C99, foreword, p5, item 22 lists among the major changes from C90:
"remove implicit function declaration".
 1.6 28-Jun-2021  rillig lint: fix parse error for type 'void (*)[*]'
 1.5 28-Jun-2021  rillig lint: fix type name for prototype function without parameters
 1.4 28-Jun-2021  rillig lint: add type information to message 155 (type mismatch)
 1.3 28-Jun-2021  rillig lint: turn null pointer dereference into assertion failure

Originally I only needed a message that would output the type name from
an abstract-declarator (C99 6.7.6), to see whether lint interprets the
types correctly.

Message 155 looked like a good candidate, but it only revealed more
incomplete and untested code in lint.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 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.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.4 27-Feb-2021  rillig tests/lint: add more tests for enum mismatch
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 27-Feb-2021  rillig tests/lint: add more tests for enum mismatch
 1.3 14-Jan-2021  rillig lint: add type details to message for enum type mismatch

Before December 2020, it was cumbersome to add type information to a
message since the caller had to explicitly allocate buffers for the type
names. That's probably the reason why this crucial detail had been left
out of the warning.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 19-Apr-2022  rillig lint: only warn about unsigned constants in C90 migration mode

For C99 code, the difference between traditional C and C90 is not
relevant.

Seen in sqlite3.c line 30448.
 1.3 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 19-Apr-2022  rillig lint: only warn about unsigned constants in C90 migration mode

For C99 code, the difference between traditional C and C90 is not
relevant.

Seen in sqlite3.c line 30448.
 1.2 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 16-Mar-2021  rillig tests/lint: add tests for a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.7 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.6 22-Apr-2023  rillig tests/lint: add test for conversions to and from a union type

Additionally, fix the line numbers in another test.
 1.5 22-Apr-2023  rillig lint: do not warn about parenthesized assignment in controlling expr

Same as for GCC and Clang.
 1.4 06-Jul-2022  rillig tests/lint: add test for 'assignment in conditional context'
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.10 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.8 18-May-2022  rillig lint: do not warn about '==' on the right-hand side of ','
 1.7 18-May-2022  rillig tests/lint: add more examples for warning in comma expression
 1.6 09-Oct-2021  rillig tests/lint: add examples for bogus warning 160 and for error 323
 1.5 31-Jan-2021  rillig lint: fix strange message about nested '==' operators

If one of the nested subexpressions is parenthesized, the author
probably knew how these expressions are evaluated. Therefore don't warn
in such a situation.

Maybe the original author once made a typo and tried to initialize
variables but instead compared them, like this:

int a, b, c;

a == b == c;

This would explain the text of the message, which still sounds strange.
At least it doesn't show up as often anymore.
 1.4 31-Jan-2021  rillig lint: add more test cases for strange '==' warning 160
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 09-Jan-2021  rillig lint: add test for message 160
 1.1 02-Jan-2021  rillig 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.
 1.9 17-Jun-2022  rillig 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'.
 1.8 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.7 18-May-2022  rillig lint: do not warn about '==' on the right-hand side of ','
 1.6 18-May-2022  rillig tests/lint: add more examples for warning in comma expression
 1.5 09-Oct-2021  rillig tests/lint: add examples for bogus warning 160 and for error 323
 1.4 31-Jan-2021  rillig lint: fix strange message about nested '==' operators

If one of the nested subexpressions is parenthesized, the author
probably knew how these expressions are evaluated. Therefore don't warn
in such a situation.

Maybe the original author once made a typo and tried to initialize
variables but instead compared them, like this:

int a, b, c;

a == b == c;

This would explain the text of the message, which still sounds strange.
At least it doesn't show up as often anymore.
 1.3 31-Jan-2021  rillig lint: add more test cases for strange '==' warning 160
 1.2 09-Jan-2021  rillig lint: add test for message 160
 1.1 02-Jan-2021  rillig 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.
 1.13 06-Apr-2025  rillig lint: remove warning about 'constant in conditional context'

In a full NetBSD build, this warning occurs about 2400 times, making it
the top 9 warning overall. There is no evidence though that this
warning detects any real bugs, so the noise it makes is not warranted.

In this first step, the warning is still listed in the lint(7) manual
page, as removing it from there would immediately make all places with
"LINTFLAGS += -X 161" fail. These '-X 161' flags cannot be removed
first because then, the warning would step in and make the build fail.

The next step is to clean up the "-X 161" options from all LINTFLAGS,
and then the final step is to remove the warning from err.c.
 1.12 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.11 19-Jun-2023  rillig branches: 1.11.2;
tests/lint: comma operators are not allowed in constant expressions
 1.10 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.8 16-Apr-2022  rillig lint: investigate why lint only warns about some constant conditions

Noticed in lex.c, in the macro kwdef, where lint complains about the
condition containing '||' but not about the conditions containing only
'>' or '=='.
 1.7 21-Mar-2021  rillig lint: fix reachability for while (0)
 1.6 28-Feb-2021  rillig lint: do not warn about constant expressions involving sizeof

These expressions are indeed constant for a specific platform, but on
another platform their value may change. This makes them unsuspicious
and legitimate for portable code.

Seen in rump_syscalls.c, as 'sizeof(int) > sizeof(register_t)'.
 1.5 28-Feb-2021  rillig tests/lint: add test for constant expression involving sizeof
 1.4 31-Jan-2021  rillig lint: don't warn about constant condition in 'do { } while (0)'
 1.3 31-Jan-2021  rillig lint: add expectations to test for message 161
 1.2 31-Jan-2021  rillig lint: add tests for 'constant in conditional context'

One of these tests explains why 'do { } while (0)' is so usual that
there is no reason to warn about it. That warning will not survive for
long.
 1.1 02-Jan-2021  rillig 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.
 1.11.2.1 02-Aug-2025  perseant Sync with HEAD
 1.9 17-Jun-2022  rillig 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'.
 1.8 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.7 16-Apr-2022  rillig lint: investigate why lint only warns about some constant conditions

Noticed in lex.c, in the macro kwdef, where lint complains about the
condition containing '||' but not about the conditions containing only
'>' or '=='.
 1.6 21-Mar-2021  rillig lint: fix reachability for while (0)
 1.5 28-Feb-2021  rillig lint: do not warn about constant expressions involving sizeof

These expressions are indeed constant for a specific platform, but on
another platform their value may change. This makes them unsuspicious
and legitimate for portable code.

Seen in rump_syscalls.c, as 'sizeof(int) > sizeof(register_t)'.
 1.4 28-Feb-2021  rillig tests/lint: add test for constant expression involving sizeof
 1.3 31-Jan-2021  rillig lint: don't warn about constant condition in 'do { } while (0)'
 1.2 31-Jan-2021  rillig lint: add tests for 'constant in conditional context'

One of these tests explains why 'do { } while (0)' is so usual that
there is no reason to warn about it. That warning will not survive for
long.
 1.1 02-Jan-2021  rillig 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.
 1.9 11-May-2024  rillig lint: warn when comparing an integer to a floating point constant
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 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.6 05-Sep-2021  rillig lint: do not warn about comparison 'unsigned <= 0'

Seen in scanners generated by Flex, and about 50 occurrences in the
NetBSD src and xsrc tree, all of which are not suspicious of being bugs.
 1.5 05-Sep-2021  rillig tests/lint: test comparison of 'unsigned <= 0'
 1.4 28-Aug-2021  rillig tests/lint: extend test for nonportable character comparison
 1.3 23-Aug-2021  rillig tests/lint: add tests for integer comparisons
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7 17-Jun-2022  rillig 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'.
 1.6 05-Sep-2021  rillig lint: do not warn about comparison 'unsigned <= 0'

Seen in scanners generated by Flex, and about 50 occurrences in the
NetBSD src and xsrc tree, all of which are not suspicious of being bugs.
 1.5 05-Sep-2021  rillig tests/lint: test comparison of 'unsigned <= 0'
 1.4 28-Aug-2021  rillig tests/lint: extend test for nonportable character comparison
 1.3 23-Aug-2021  rillig tests/lint: add tests for integer comparisons
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 04-Jul-2021  rillig lint: remove support for obsolete GCC-style lvalue casts

Since GCC 4.0, a cast results in an rvalue.
 1.3 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.2 17-Jan-2021  rillig lint: add test for rvalue ++ after cast
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 04-Jul-2021  rillig lint: remove support for obsolete GCC-style lvalue casts

Since GCC 4.0, a cast results in an rvalue.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 17-Jan-2021  rillig lint: add test for rvalue ++ after cast
 1.1 02-Jan-2021  rillig 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.
 1.7 08-Jun-2024  rillig lint: add details to warnings about negative constant to unsigned
 1.6 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.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.6 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.5 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 08-Jun-2024  rillig lint: add details to warnings about negative constant to unsigned
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 16-May-2021  rillig 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]
 1.2 31-Jan-2021  rillig branches: 1.2.2;
lint: add test for lossy assignments to bit-fields (164, 166)
 1.1 02-Jan-2021  rillig 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.
 1.2.2.1 31-May-2021  cjep sync with head
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 16-May-2021  rillig 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]
 1.3 16-May-2021  rillig lint: add type information to unportable bit-field type

Seeing the message "unportable bit-field type 'int'" may sound strange
at first, but that's a strict interpretation of the wording in C99
6.7.2.1p4, which requires that the bit-field type is "'_Bool', 'unsigned
int' or 'signed int', or some other implementation-defined type".

The rationale for C99 6.7.2.1 explicitly lists plain 'int' among the
allowed types for bit-fields, regardless of any additional
implementation-defined types. This means that lint had interpreted this
paragraph wrong, and it should be fixed to allow plain int as well.
 1.2 31-Jan-2021  rillig branches: 1.2.2;
lint: add test for lossy assignments to bit-fields (164, 166)
 1.1 02-Jan-2021  rillig 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.
 1.2.2.1 31-May-2021  cjep sync with head
 1.7 30-Mar-2024  rillig lint: reword messages about array subscripts to sound more natural
 1.6 27-Mar-2024  rillig lint: don't use 'long' in diagnostics

The size of 'long' differs between 64-bit and 32-bit platforms.
Eliminate this possible platform-dependency.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.13 30-Mar-2024  rillig lint: do not convert array subscripts from size_t to ptrdiff_t

The C standards do not specify a fixed type for an array subscript, it
just has to be an integer type. Previously, query 4 fired for the
ubiquitous expression 'ptr[sz]' when sz had type 'size_t'.

The test platform_ilp32_long is unaffected by this change, as the
integer constant 0x80000000 has type 'unsigned int', while size_t is
'unsigned long' on those platforms, and even though the types 'unsigned
int' and 'unsigned long' have the same value space, there's still a
conversion, at least for now.
 1.12 30-Mar-2024  rillig lint: reword messages about array subscripts to sound more natural
 1.11 27-Mar-2024  rillig lint: don't use 'long' in diagnostics

The size of 'long' differs between 64-bit and 32-bit platforms.
Eliminate this possible platform-dependency.
 1.10 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.8 30-May-2022  rillig tests/lint: explain how lint represents pointer addition
 1.7 30-May-2022  rillig lint: revert 'do not pre-multiply pointer expressions' from 2022-05-26

In tree.c 1.448, removing the pre-multiplication generated wrong
warnings about out-of-bounds array access.
 1.6 30-May-2022  rillig tests/lint: demonstrate wrong warning 'array subscript cannot be'

Since tree.c 1.448 from 2022-05-26.
 1.5 25-Mar-2021  rillig lint: fix initialization for arrays with designators

From the previous commit, there was an off-by-one error left, which was
due to the interaction between designation_add_subscript and
extend_if_array_of_unknown_size.

The other crucial point was to call initstack_pop_nobrace before
accessing the "current initialization stack element". Without this
call, in msg_168.c the "current element" would point to the initializer
level for 'const char *' instead of the one for 'array of const char *'.

One more step towards supporting C99.
 1.4 25-Mar-2021  rillig lint: improve initialization of arrays with designators

Initialization is still buggy but better than before. The remaining bug
is that only the first designator determines the array size, and after
that, the array is no longer considered of unknown size. This
contradicts C99. More improvements to come.
 1.3 07-Mar-2021  rillig tests/lint: demonstrate wrong warning for array subscript

Seen in usr.bin/indent/lexi.c.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.9 17-Jun-2022  rillig 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'.
 1.8 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.7 30-May-2022  rillig lint: revert 'do not pre-multiply pointer expressions' from 2022-05-26

In tree.c 1.448, removing the pre-multiplication generated wrong
warnings about out-of-bounds array access.
 1.6 30-May-2022  rillig tests/lint: demonstrate wrong warning 'array subscript cannot be'

Since tree.c 1.448 from 2022-05-26.
 1.5 25-Mar-2021  rillig lint: fix initialization for arrays with designators

From the previous commit, there was an off-by-one error left, which was
due to the interaction between designation_add_subscript and
extend_if_array_of_unknown_size.

The other crucial point was to call initstack_pop_nobrace before
accessing the "current initialization stack element". Without this
call, in msg_168.c the "current element" would point to the initializer
level for 'const char *' instead of the one for 'array of const char *'.

One more step towards supporting C99.
 1.4 25-Mar-2021  rillig lint: improve initialization of arrays with designators

Initialization is still buggy but better than before. The remaining bug
is that only the first designator determines the array size, and after
that, the array is no longer considered of unknown size. This
contradicts C99. More improvements to come.
 1.3 07-Mar-2021  rillig tests/lint: demonstrate wrong warning for array subscript

Seen in usr.bin/indent/lexi.c.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.10 15-Dec-2024  rillig lint: merge duplicate code for possibly confusing precedence
 1.9 15-Dec-2024  rillig lint: add details to message about possible precedence confusion
 1.8 07-Jul-2023  rillig branches: 1.8.2;
lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.4 04-Jan-2021  rillig lint: document and demonstrate the bug in check_precedence_confusion

It took quite a while to get to the correct interpretation of this small
piece of code and to draw the right conclusions from it. Now the bug is
finally ready to be fixed, as already announced in the test.
 1.3 04-Jan-2021  rillig lint: finish the comments in check_precedence_confusion
 1.2 04-Jan-2021  rillig lint: add test for "precedence confusion possible [169]"
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 17-Jun-2022  rillig 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'.
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.4 04-Jan-2021  rillig lint: fix bug in "precedence confusion possible [169]"
 1.3 04-Jan-2021  rillig lint: document and demonstrate the bug in check_precedence_confusion

It took quite a while to get to the correct interpretation of this small
piece of code and to draw the right conclusions from it. Now the bug is
finally ready to be fixed, as already announced in the test.
 1.2 04-Jan-2021  rillig lint: add test for "precedence confusion possible [169]"
 1.1 02-Jan-2021  rillig 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.
 1.8 06-Aug-2023  rillig lint: since C99, a non-void function must return a value
 1.7 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.6 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.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 17-Jun-2022  rillig 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'.
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.9 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.8 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.7 21-Dec-2021  rillig tests/lint: extend test for nested initializations
 1.6 23-Mar-2021  rillig lint: fix wrong error message about type mismatch in compound literal

Now that the code contains explicit markers for starting and ending an
initialization, and having the guarantee that an assertion fails
whenever some code accesses the state of the "current initialization"
even though there is no ongoing initialization gives me much more
confidence in the correctness of the code. The calls to
begin_initialization and end_initialization always appear in pairs,
enclosing the minimal amount of code necessary for initialization.

In a nutshell, global modifiable state is error-prone and hard to
understand.

A nice side effect is that the grammar no longer needs a special rule
for the outermost initializer since the functions for the debug logging
are now called explicitly.

The code that misuses the initialization state just because it needs to
temporarily store a sym_t somewhere is now clearly marked as such. A
GCC statement expression can appear anywhere and is therefore
independent of the initialization. Most probably the code can simply
refer to the local variable in the grammar rule itself, or this variable
needs to be encoded in the grammar %union. For sure there is a better
way to handle this.

There is no longer a need that the function 'declare' initializes the
initialization state, it was just the wrong place to do this.
 1.5 22-Mar-2021  rillig tests/lint: explain wrong type mismatch in compound literal

When a pointer to a compound literal is used as an initializer, lint
reports a wrong type mismatch. The details of what happens are now
documented, which allows this problem to be fixed properly.
 1.4 22-Mar-2021  rillig lint: use precise type information in message about type mismatch

While here, reword the message, avoiding operators and parentheses.

Since 2021-01-02, providing the precise type name is as easy as the
broad type classification (just replace tspec_name with type_name), and
it's definitely more useful to the human readers.
 1.3 22-Mar-2021  rillig lint: demonstrate bug in assignment of compound literal

Seen in external/mpl/bind/dist/lib/dns/rbtdb.c, update_rrsetstats.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.8 17-Jun-2022  rillig 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'.
 1.7 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.6 23-Mar-2021  rillig lint: fix wrong error message about type mismatch in compound literal

Now that the code contains explicit markers for starting and ending an
initialization, and having the guarantee that an assertion fails
whenever some code accesses the state of the "current initialization"
even though there is no ongoing initialization gives me much more
confidence in the correctness of the code. The calls to
begin_initialization and end_initialization always appear in pairs,
enclosing the minimal amount of code necessary for initialization.

In a nutshell, global modifiable state is error-prone and hard to
understand.

A nice side effect is that the grammar no longer needs a special rule
for the outermost initializer since the functions for the debug logging
are now called explicitly.

The code that misuses the initialization state just because it needs to
temporarily store a sym_t somewhere is now clearly marked as such. A
GCC statement expression can appear anywhere and is therefore
independent of the initialization. Most probably the code can simply
refer to the local variable in the grammar rule itself, or this variable
needs to be encoded in the grammar %union. For sure there is a better
way to handle this.

There is no longer a need that the function 'declare' initializes the
initialization state, it was just the wrong place to do this.
 1.5 22-Mar-2021  rillig lint: use precise type information in message about type mismatch

While here, reword the message, avoiding operators and parentheses.

Since 2021-01-02, providing the precise type name is as easy as the
broad type classification (just replace tspec_name with type_name), and
it's definitely more useful to the human readers.
 1.4 22-Mar-2021  rillig lint: demonstrate bug in assignment of compound literal

Seen in external/mpl/bind/dist/lib/dns/rbtdb.c, update_rrsetstats.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.7 09-May-2024  rillig lint: add details to message about too many initializers
 1.6 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.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 21-Mar-2021  rillig tests/lint: clarify that a brace-enclosed initializer needs an expr
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 08-Jan-2021  rillig lint: add tests for several messages
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 30-Mar-2021  rillig lint: add type information to message 175
 1.3 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.11 17-Jun-2022  rillig 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'.
 1.10 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.9 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.8 13-Jul-2021  rillig lint: fix wording of message for incomplete struct (2021-07-04)

A struct member is not an argument. In err.c 1.124 from 2021-07-04, the
wording had been changed, without noticing that the message was used
twice: once for an argument, once for a struct member.
 1.7 04-Jul-2021  rillig lint: improve wording for incomplete struct or union
 1.6 09-Apr-2021  rillig lint: for structs and unions, include incompleteness in the type name

This mainly helps to assess the situation where lint warns that a
pointer cast "may be troublesome", see msg_247.exp.
 1.5 30-Mar-2021  rillig lint: add type information to message 175
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 28-Mar-2021  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.3 28-Mar-2021  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 24-Feb-2025  rillig tests/lint: add tests for constants, pointers and lost bits
 1.4 28-Mar-2023  rillig branches: 1.4.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 24-Jan-2021  rillig lint: add tests for a few messages
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 22-Dec-2021  rillig lint: fix handling of initializations

The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
 1.3 27-Aug-2021  rillig lint: remove unused message for struct without named members

Lint has not produced this message since the rewrite of the
initializations in March 2021. Structures that consist of only unnamed
bit-fields probably don't occur in practice.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 22-Dec-2021  rillig lint: fix handling of initializations

The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
 1.3 27-Aug-2021  rillig lint: remove unused message for struct without named members

Lint has not produced this message since the rewrite of the
initializations in March 2021. Structures that consist of only unnamed
bit-fields probably don't occur in practice.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.7 21-Jul-2023  rillig lint: reword message about non-constant initializer
 1.6 21-Jul-2023  rillig tests/lint: document an example of a non-constant initializer
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 29-Mar-2021  rillig tests/lint: test initialization without braces
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 29-Mar-2021  rillig tests/lint: test initialization without braces
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 23-Nov-2024  rillig lint: add details to messages about discarding qualifiers

The related message 153 is left as-is, as it is used in two places, and
the second place is not only about discarded qualifiers.
 1.7 28-Jan-2024  rillig branches: 1.7.2;
tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.6 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.5 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.4 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.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.7 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.6 09-Jul-2023  rillig branches: 1.6.2;
lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.5 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.4 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.3 02-Sep-2021  rillig tests/lint: test messages 183 and 187
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 02-Sep-2021  rillig tests/lint: test messages 183 and 187
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 07-Jul-2023  rillig branches: 1.6.2;
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.5 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.4 14-Aug-2021  rillig lint: use standard quoting style for messages 124 and 184
 1.3 19-Mar-2021  rillig tests/lint: add test for incompatible pointer types in return
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 14-Aug-2021  rillig lint: use standard quoting style for messages 124 and 184
 1.2 19-Mar-2021  rillig tests/lint: add test for incompatible pointer types in return
 1.1 02-Jan-2021  rillig 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.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.5 18-Mar-2021  rillig lint: reword message about type mismatch in initialization

Using parentheses for quotes is unusual, furthermore the previous
message didn't follow proper grammar rules, sacrificing clarity for
brevity.
 1.4 18-Mar-2021  rillig tests/lint: add test for type mismatch in initialization

Copied and adapted from d_c99_init.c.
 1.3 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 18-Mar-2021  rillig lint: reword message about type mismatch in initialization

Using parentheses for quotes is unusual, furthermore the previous
message didn't follow proper grammar rules, sacrificing clarity for
brevity.
 1.2 18-Mar-2021  rillig tests/lint: add test for type mismatch in initialization

Copied and adapted from d_c99_init.c.
 1.1 02-Jan-2021  rillig 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.
 1.7 29-Mar-2024  rillig lint: fix wording of warning about bit-field initializer
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.3 21-Feb-2021  rillig lint: add test for bit-field initialisation in traditional C
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.3 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.2 21-Feb-2021  rillig lint: add test for bit-field initialisation in traditional C
 1.1 02-Jan-2021  rillig 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.
 1.6 27-Mar-2024  rillig lint: don't use 'long' in diagnostics

The size of 'long' differs between 64-bit and 32-bit platforms.
Eliminate this possible platform-dependency.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 21-Dec-2021  rillig lint: reword message 187 about too long string literal for initializer

The previous message was imprecise in that it didn't distinguish between
non-terminating and terminating null bytes.
 1.3 02-Sep-2021  rillig tests/lint: test messages 183 and 187
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 21-Dec-2021  rillig lint: reword message 187 about too long string literal for initializer

The previous message was imprecise in that it didn't distinguish between
non-terminating and terminating null bytes.
 1.3 02-Sep-2021  rillig tests/lint: test messages 183 and 187
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.7 28-Jan-2024  rillig branches: 1.7.2;
tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.6 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 28-Mar-2021  rillig tests/lint: add test for struct initialization in traditional C
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.3 28-Mar-2021  rillig tests/lint: add test for struct initialization in traditional C
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 17-Jun-2022  rillig branches: 1.6.4;
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.5 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.6.4.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.4 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.3 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 10-Jul-2021  rillig tests/lint: add more tests for covering the grammar
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 10-Jul-2021  rillig tests/lint: add more tests for covering the grammar
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.12 28-Sep-2024  rillig lint: handle __attribute__((__unused__)) for functions and variables

Previously, lint ignored the '__unused' marker, requiring its own /*
ARGSUSED */ marker instead.

Previously, attributes were interpreted as soon as the closing
parenthesis was parsed. For a function definition such as '__unused
static void f(void) {}', this was too early, as the attribute was not
connected to the function, as the function was not parsed yet.

Now, the 'unused' attribute is passed around by the parser, until it is
merged into the declarator where it belongs. Due to an inaccuracy in
the grammar, the 'used' attribute has to be passed through a
parameter_list, even though a parameter list is not related to
attributes. Still, it's better than before.
 1.11 27-Sep-2024  rillig tests/lint: test unused parameters and local variables
 1.10 26-Sep-2024  rillig tests/lint: test more cases of unused parameters and local variables
 1.9 12-Sep-2023  rillig branches: 1.9.2;
lint: mark unreachable function call arguments as used as well

Previously, in a '?:' expression with a constant condition, the branch
that is not taken was skipped but any identifiers in there were intended
to be marked as used. In function call expressions, this only worked
for the last argument, as the PUSH operator is not a binary operator
(see ops.def). Cover this case as well.
 1.8 12-Sep-2023  rillig lint: mark symbols that are only used in untaken '?:' branch as used
 1.7 12-Sep-2023  rillig tests/lint: show that '?:' skips untaken branches early

This is probably done to avoid wrong warnings from branches that are
only taken on other platforms, but it also generates a wrong 'unused'
warning.
 1.6 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.5 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.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.22 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.21 28-Mar-2023  rillig branches: 1.21.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.20 21-Feb-2023  rillig lint: fix null pointer dereference in invalid case expression
 1.19 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.18 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.17 16-Jan-2022  rillig tests/lint: document why accidental double semicolons are hard to detect
 1.16 15-Jan-2022  rillig lint: warn about unreachable null statements

This warning flags the second semicolon of 'return;;' as being
unreachable. It does not warn about these superfluous semicolons in
general though.

Seen in usr.bin/make/bmake_malloc.c.
 1.15 15-Jan-2022  rillig tests/lint: demonstrate undetected double semicolon

In a statement-list like 'return 0;;', the second semicolon is a
separate, unreachable statement.
 1.14 15-Aug-2021  rillig tests/lint: correct interpretation of NOTREACHED

The branch is unconditionally taken, therefore any later code is
unreachable as well.
 1.13 15-Aug-2021  rillig tests/lint: test how NOTREACHED affects the unreachable warning

Inspired by lib/libedit/readline.c 1.159 from 2021-08-15.
 1.12 11-Jul-2021  rillig lint: add quotes around placeholders in message 23 and 232
 1.11 21-Mar-2021  rillig tests/lint: test reachability of goto and named labels
 1.10 21-Mar-2021  rillig tests/lint: add test for reachability of non-constant conditions
 1.9 21-Mar-2021  rillig tests/lint: add test for reachability of nested 'if' statements
 1.8 21-Mar-2021  rillig lint: warn about unreachable statement after joining the 'if' branches
 1.7 21-Mar-2021  rillig lint: fix reachability for while (0)
 1.6 21-Mar-2021  rillig lint: fix reachability for constant controlling expression in for loop
 1.5 21-Mar-2021  rillig lint: fix reachability for if-then-else statements
 1.4 21-Mar-2021  rillig lint: fix reachability computation in if statements

Previously, only loop statements were considered for reachability. This
ignored the possibility of an early return in an if statement, or
unreachable branches.
 1.3 21-Mar-2021  rillig tests/lint: add tests for reachability of statements

Right now, reachability is only implemented for loops, but not for
selection statements.
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.21.2.1 02-Aug-2025  perseant Sync with HEAD
 1.18 17-Jun-2022  rillig 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'.
 1.17 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.16 16-Jan-2022  rillig tests/lint: document why accidental double semicolons are hard to detect
 1.15 15-Jan-2022  rillig lint: warn about unreachable null statements

This warning flags the second semicolon of 'return;;' as being
unreachable. It does not warn about these superfluous semicolons in
general though.

Seen in usr.bin/make/bmake_malloc.c.
 1.14 15-Aug-2021  rillig tests/lint: correct interpretation of NOTREACHED

The branch is unconditionally taken, therefore any later code is
unreachable as well.
 1.13 15-Aug-2021  rillig tests/lint: test how NOTREACHED affects the unreachable warning

Inspired by lib/libedit/readline.c 1.159 from 2021-08-15.
 1.12 11-Jul-2021  rillig lint: add quotes around placeholders in message 23 and 232
 1.11 21-Mar-2021  rillig tests/lint: test reachability of goto and named labels
 1.10 21-Mar-2021  rillig tests/lint: add test for reachability of non-constant conditions
 1.9 21-Mar-2021  rillig tests/lint: add test for reachability of nested 'if' statements
 1.8 21-Mar-2021  rillig lint: warn about unreachable statement after joining the 'if' branches
 1.7 21-Mar-2021  rillig lint: fix reachability for while (0)
 1.6 21-Mar-2021  rillig lint: fix reachability for constant controlling expression in for loop
 1.5 21-Mar-2021  rillig lint: fix reachability for if-then-else statements
 1.4 21-Mar-2021  rillig lint: fix reachability computation in if statements

Previously, only loop statements were considered for reachability. This
ignored the possibility of an early return in an if statement, or
unreachable branches.
 1.3 21-Mar-2021  rillig tests/lint: add tests for reachability of statements

Right now, reachability is only implemented for loops, but not for
selection statements.
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 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.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.4 11-Jul-2021  rillig lint: add quotes around placeholders in message 23 and 232
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 27-Feb-2025  rillig lint: normalize whitespace
 1.5 27-Feb-2025  rillig lint: add details to message about conversion in 'case'
 1.4 07-Sep-2023  rillig branches: 1.4.2;
tests/lint: test case labels with out-of-bounds values
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 27-Mar-2024  rillig lint: don't use 'long' in diagnostics

The size of 'long' differs between 64-bit and 32-bit platforms.
Eliminate this possible platform-dependency.
 1.4 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig tests/lint: make expectation lines in the tests more detailed

This commit migrates msg_100 until msg_199.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 27-Mar-2024  rillig lint: don't use 'long' in diagnostics

The size of 'long' differs between 64-bit and 32-bit platforms.
Eliminate this possible platform-dependency.
 1.5 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.4 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.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: add tests for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 26-Aug-2021  rillig tests/lint: add tests for several messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.3 22-Aug-2021  rillig lint: use standard quotes in messages 203 and 271
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 22-Aug-2021  rillig lint: use standard quotes in messages 203 and 271
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.11 06-Aug-2023  rillig lint: since C99, a non-void function must return a value
 1.10 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.9 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 16-Jun-2022  rillig 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.
 1.6 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.5 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.4 17-Jan-2021  rillig lint: rename build_ampersand to build_address

At that stage of analysis, the ampersand is no longer ambiguous, it has
already been resolved as the address-of operator, instead of the
bitwise-and operator.
 1.3 08-Jan-2021  rillig lint: fix function as controlling expression (since 2020-12-31)

It's perfectly valid to directly use a function name as the controlling
expression of an if statement. That function name is converted
implicitly to a pointer to that function, and that is a scalar value
then.

Spotted by christos in lib/libpthread/pthread.c:634.
 1.2 08-Jan-2021  rillig lint: demonstrate wrong message 204 (since 2020-12-31)

In func.c 1.39 from 2020-12-31 18:51:28, the check that controlling
expressions are indeed scalar was extended from while and for loops to
if statements as well. It just seemed to have been an oversight.

This revealed a bug in lint, which didn't accept the following valid
code snippet from lib/libpthread/pthread.c:634:

void _malloc_thread_cleanup(void) __weak;
...
if (_malloc_thread_cleanup)
_malloc_thread_cleanup();

Testing a function (instead of a function pointer) for truthiness is
probably rare since most functions are defined unconditionally. For
weak functions it comes in handy though.

Clang-Tidy suggests to prefix the function with '&' to silence its
warning. Doing that revealed a non-obvious behavior in build_ampersand,
which does not add the AMPER node to the expression even though it is
clearly mentioned in the code. That is left for further research.

Once the original bug is fixed, it probably doesn't matter whether the
AMPER is discarded or retained since check_controlling_expression would
add it back. There's probably a reason though to sometimes discard the
AMPER and sometimes retain it.
 1.1 02-Jan-2021  rillig 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.
 1.8 17-Jun-2022  rillig 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'.
 1.7 16-Jun-2022  rillig 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.
 1.6 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.5 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 08-Jan-2021  rillig lint: fix function as controlling expression (since 2020-12-31)

It's perfectly valid to directly use a function name as the controlling
expression of an if statement. That function name is converted
implicitly to a pointer to that function, and that is a scalar value
then.

Spotted by christos in lib/libpthread/pthread.c:634.
 1.2 08-Jan-2021  rillig lint: demonstrate wrong message 204 (since 2020-12-31)

In func.c 1.39 from 2020-12-31 18:51:28, the check that controlling
expressions are indeed scalar was extended from while and for loops to
if statements as well. It just seemed to have been an oversight.

This revealed a bug in lint, which didn't accept the following valid
code snippet from lib/libpthread/pthread.c:634:

void _malloc_thread_cleanup(void) __weak;
...
if (_malloc_thread_cleanup)
_malloc_thread_cleanup();

Testing a function (instead of a function pointer) for truthiness is
probably rare since most functions are defined unconditionally. For
weak functions it comes in handy though.

Clang-Tidy suggests to prefix the function with '&' to silence its
warning. Doing that revealed a non-obvious behavior in build_ampersand,
which does not add the AMPER node to the expression even though it is
clearly mentioned in the code. That is left for further research.

Once the original bug is fixed, it probably doesn't matter whether the
AMPER is discarded or retained since check_controlling_expression would
add it back. There's probably a reason though to sometimes discard the
AMPER and sometimes retain it.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 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.6 22-May-2022  rillig lint: fix wrong warning about unhandled enum constants in switch
 1.5 22-May-2022  rillig tests/lint: demonstrate wrong warning for switch on enum
 1.4 08-Jul-2021  rillig lint: fix wrong check for enum constants in switch (since today)
 1.3 08-Jul-2021  rillig lint: demonstrate bug in handling enum declarations (since today)

Since cgram.y 1.270 from today (a "cleanup" commit), the enum constants
were only registered in the symbol table, but they were not added to the
enum type (en_first_enumerator). That information is used for
validating switch statements on enum types.

The actual bug is an off-by-one error in the grammar, in the grammar
rule 'enum_declaration'. Yacc does not notice this obvious error.
Bison does, but it is not involved in building lint.

In the grammar rule 'enum_declaration', the intended $3 contains the
first enumeration constant of the type, while $2, which yacc interprets
as a symbol, contains a null pointer, at least on x86_64.

The existing tests did not cover this scenario, so the bug went
unnoticed.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7 17-Jun-2022  rillig 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'.
 1.6 22-May-2022  rillig lint: fix wrong warning about unhandled enum constants in switch
 1.5 22-May-2022  rillig tests/lint: demonstrate wrong warning for switch on enum
 1.4 08-Jul-2021  rillig lint: fix wrong check for enum constants in switch (since today)
 1.3 08-Jul-2021  rillig lint: demonstrate bug in handling enum declarations (since today)

Since cgram.y 1.270 from today (a "cleanup" commit), the enum constants
were only registered in the symbol table, but they were not added to the
enum type (en_first_enumerator). That information is used for
validating switch statements on enum types.

The actual bug is an off-by-one error in the grammar, in the grammar
rule 'enum_declaration'. Yacc does not notice this obvious error.
Bison does, but it is not involved in building lint.

In the grammar rule 'enum_declaration', the intended $3 contains the
first enumeration constant of the type, while $2, which yacc interprets
as a symbol, contains a null pointer, at least on x86_64.

The existing tests did not cover this scenario, so the bug went
unnoticed.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 07-Jul-2025  rillig lint: disable message 207 about 'loop not entered at top'

The purpose of the message is unclear, and it produces several warnings
in legitimate code.
 1.5 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.4 19-Apr-2024  rillig branches: 1.4.2;
tests/lint: show how to trigger message 207
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 16-Jun-2022  rillig 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.
 1.5 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.4 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.3 21-Feb-2021  rillig lint: add test for enum mismatch in initialization

This warning is currently not user-friendly because it omits any type
information, but that information is crucial.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7 17-Jun-2022  rillig 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'.
 1.6 16-Jun-2022  rillig 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.
 1.5 28-Feb-2021  rillig lint: output precise type information for struct/union/enum

Previously, 'typedef enum { E } name' was output as 'name', which
omitted the information that this was an enum type. Now it is output as
'enum typedef name'.

Previously, 'typedef struct { int member; } name' was output as 'struct
<unnamed>', which omitted the typedef name. Now it is output as 'struct
typedef name'.
 1.4 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.3 21-Feb-2021  rillig lint: add type information to message about enum mismatch
 1.2 21-Feb-2021  rillig lint: add test for enum mismatch in initialization

This warning is currently not user-friendly because it omits any type
information, but that information is crucial.
 1.1 02-Jan-2021  rillig 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.
 1.9 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.8 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.7 08-Jun-2024  rillig branches: 1.7.2;
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.
 1.6 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.5 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.4 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.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.5 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.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 06-Aug-2023  rillig lint: since C99, a non-void function must return a value
 1.5 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.4 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.3 03-Aug-2021  rillig lint: casting to a struct is not allowed in C99, only with GCC
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.3 03-Aug-2021  rillig lint: casting to a struct is not allowed in C99, only with GCC
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.13 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.12 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.11 29-Aug-2021  rillig lint: in C99 mode, make implicit function declarations an error

In tree.c 1.294 from 2021-06-28, I had already tried this, but at that
time, there were too many implicit function definitions in the NetBSD
tree. Most of them were GCC builtins, which lint did not recognize.
Therefore I had to revert to a warning in tree.c 1.302 from 2021-06-30.

In the meantime, lint has learnt to recognize compiler builtins, see
is_compiler_builtin, so try again now. The build logs from x86_64,
i386, sparc and sparc64 show no more implicit function declarations.
 1.10 29-Aug-2021  rillig lint: add __sync_ and _mm_ as prefixes for builtin functions

These two additions cover all cases that occur in the current NetBSD
build on x86_64. This allows build_name to use the usual pattern 'if
Sflag then error else if sflag then warning'. That function currently
issues a warning in C99 as well, even though C99 prohibits implicit
function declarations.
 1.9 30-Jun-2021  rillig lint: do not warn about use of implicitly declared GCC builtins
 1.8 30-Jun-2021  rillig lint: in C99 mode, only warn about implicit function declarations

Since tree.c 1.294 from 2021-06-28 (two days ago), lint errored out on
an implicit function declaration. In principle it is correct to do so
since C99 requires it, but in practice there are a several functions
that are not declared in the translation unit itself since they are
provided by the compiler. Typical examples for GCC and Clang are the
various functions named '__builtin_*' and '__atomic_*'.

For now, only warn about these but don't error out.
 1.7 30-Jun-2021  rillig lint: mention the name of an implicitly declared function

In the regular NetBSD builds, this happened in swab.c:65. That line
contains __predict_false, which may or may not be a macro. In other
cases, there may be more than one function call in a single line.
 1.6 30-Jun-2021  rillig tests/lint: extend test for message 215 about implicit function
 1.5 30-Jun-2021  rillig lint: fix type name in message 101 for wrong member name
 1.4 30-Jun-2021  rillig tests/lint: extend and explain test for implicit function declaration
 1.3 28-Jun-2021  rillig lint: in C99 mode, complain about implicitly declared functions

C99, foreword, p5, item 22 lists among the major changes from C90:
"remove implicit function declaration".
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.10 17-Jun-2022  rillig 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'.
 1.9 29-Aug-2021  rillig lint: in C99 mode, make implicit function declarations an error

In tree.c 1.294 from 2021-06-28, I had already tried this, but at that
time, there were too many implicit function definitions in the NetBSD
tree. Most of them were GCC builtins, which lint did not recognize.
Therefore I had to revert to a warning in tree.c 1.302 from 2021-06-30.

In the meantime, lint has learnt to recognize compiler builtins, see
is_compiler_builtin, so try again now. The build logs from x86_64,
i386, sparc and sparc64 show no more implicit function declarations.
 1.8 30-Jun-2021  rillig lint: in C99 mode, only warn about implicit function declarations

Since tree.c 1.294 from 2021-06-28 (two days ago), lint errored out on
an implicit function declaration. In principle it is correct to do so
since C99 requires it, but in practice there are a several functions
that are not declared in the translation unit itself since they are
provided by the compiler. Typical examples for GCC and Clang are the
various functions named '__builtin_*' and '__atomic_*'.

For now, only warn about these but don't error out.
 1.7 30-Jun-2021  rillig lint: mention the name of an implicitly declared function

In the regular NetBSD builds, this happened in swab.c:65. That line
contains __predict_false, which may or may not be a macro. In other
cases, there may be more than one function call in a single line.
 1.6 30-Jun-2021  rillig tests/lint: extend test for message 215 about implicit function
 1.5 30-Jun-2021  rillig lint: fix type name in message 101 for wrong member name
 1.4 30-Jun-2021  rillig tests/lint: extend and explain test for implicit function declaration
 1.3 28-Jun-2021  rillig lint: in C99 mode, complain about implicitly declared functions

C99, foreword, p5, item 22 lists among the major changes from C90:
"remove implicit function declaration".
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 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.6 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.5 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.4 16-Jun-2022  rillig 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.
 1.3 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.17 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.16 30-Nov-2024  rillig tests/lint: add a few more tests to increase code coverage
 1.15 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.14 13-Nov-2024  rillig lint: handle _Noreturn, [[noreturn]] and __attribute__((__noreturn__))
 1.13 13-Nov-2024  rillig tests/lint: demonstrate missing [[noreturn]] handling
 1.12 07-Jul-2023  rillig branches: 1.12.2;
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.11 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.10 16-Jun-2022  rillig 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.
 1.9 21-Mar-2021  rillig lint: fix reachability for if-then-else statements
 1.8 21-Mar-2021  rillig lint: fix reachability computation in if statements

Previously, only loop statements were considered for reachability. This
ignored the possibility of an early return in an if statement, or
unreachable branches.
 1.7 21-Mar-2021  rillig tests/lint: demonstrate bug in endless loop detection
 1.6 21-Mar-2021  rillig lint: fix wrong 'falls off bottom' after return in do-while
 1.5 21-Mar-2021  rillig lint: fix wrong 'statement not reached' in do-while loop
 1.4 21-Feb-2021  rillig lint: fix wrong warning about main falling off the bottom in C99 mode

This gets lint a small step closer to implementing C99.
 1.3 31-Jan-2021  rillig lint: demonstrate wrong and misleading warnings about reachability
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.12.2.1 02-Aug-2025  perseant Sync with HEAD
 1.10 17-Jun-2022  rillig 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'.
 1.9 16-Jun-2022  rillig 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.
 1.8 21-Mar-2021  rillig lint: fix reachability for if-then-else statements
 1.7 21-Mar-2021  rillig lint: fix reachability computation in if statements

Previously, only loop statements were considered for reachability. This
ignored the possibility of an early return in an if statement, or
unreachable branches.
 1.6 21-Mar-2021  rillig tests/lint: demonstrate bug in endless loop detection
 1.5 21-Mar-2021  rillig lint: fix wrong 'falls off bottom' after return in do-while
 1.4 21-Mar-2021  rillig lint: fix wrong 'statement not reached' in do-while loop
 1.3 31-Jan-2021  rillig lint: demonstrate wrong and misleading warnings about reachability
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.10 28-Jan-2024  rillig tests/lint: fix tests for integer constants on ILP32 platforms

The comment in msg_218 was both off-topic and wrong, so remove it.
 1.9 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.8 08-Jul-2023  rillig tests/lint: fix a few ilp32 tests
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 19-Feb-2023  rillig lint: do not warn about traditional C migration in C99 mode

For large integer constants, the resulting type could differ between
traditional C and C90. In C99 mode, this difference is no longer
relevant since it is too far away from traditional C.
 1.5 19-Feb-2023  rillig tests/lint: fix and extend tests for C90 migration warning
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 28-Mar-2023  rillig branches: 1.6.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 27-Feb-2022  rillig lint: concatenate string literals from left to right

Previously, the string literals "1" "2" "3" "4" were concatenated in the
order "23", "234", "1234". This influenced the location of the
diagnostics for traditional C (which doesn't know concatenation at all)
and for mixing regular strings and wide strings.

Now the diagnostics occur exactly where they are expected. The first
string literal defines whether the whole string is regular or wide, and
any further string literals must match it.

In traditional C mode, there are more diagnostics than before, but that
doesn't hurt since they are still correct and nobody uses lint in
traditional C mode anyway.
 1.4 27-Feb-2022  rillig tests/lint: test where exactly lint complains about concatenation

This only applies to traditional C and ensures that the behavior is
preserved when rearranging the C parser to evaluate string concatenation
from left to right.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 02-Jan-2021  rillig lint: demonstrate that -t mode is practically unusable

Since main1.c from 2014-04-18, running lint in -t mode produces strange
warnings in lines 1 to 3 of no file at all.

This is caused by the builtins that are parsed in main(). These
builtins are incompatible with traditional mode because they use long
double, which had not been known at that time.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 27-Feb-2022  rillig lint: concatenate string literals from left to right

Previously, the string literals "1" "2" "3" "4" were concatenated in the
order "23", "234", "1234". This influenced the location of the
diagnostics for traditional C (which doesn't know concatenation at all)
and for mixing regular strings and wide strings.

Now the diagnostics occur exactly where they are expected. The first
string literal defines whether the whole string is regular or wide, and
any further string literals must match it.

In traditional C mode, there are more diagnostics than before, but that
doesn't hurt since they are still correct and nobody uses lint in
traditional C mode anyway.
 1.4 27-Feb-2022  rillig tests/lint: test where exactly lint complains about concatenation

This only applies to traditional C and ensures that the behavior is
preserved when rearranging the C parser to evaluate string concatenation
from left to right.
 1.3 28-Mar-2021  rillig lint: only define GCC builtins if -g is given

This removes 7 wrong warnings when running lint in -t mode.

Surprisingly, this added a warning that had not been there before in
msg_189.c. This is because check_variable_usage skips the checks when
an error occurred before. All diagnostics that happened were warnings,
but the -w option treats them as errors, see vwarning.
 1.2 02-Jan-2021  rillig lint: demonstrate that -t mode is practically unusable

Since main1.c from 2014-04-18, running lint in -t mode produces strange
warnings in lines 1 to 3 of no file at all.

This is caused by the builtins that are parsed in main(). These
builtins are incompatible with traditional mode because they use long
double, which had not been known at that time.
 1.1 02-Jan-2021  rillig 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.
 1.11 08-May-2025  rillig lint: fix merging type attributes
 1.10 08-May-2025  rillig tests/lint: demonstrate ignored function attributes
 1.9 28-Mar-2023  rillig branches: 1.9.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.8 16-Jun-2022  rillig 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.
 1.7 29-Aug-2021  rillig lint: allow 'fallthrough' as alternative spelling of FALLTHROUGH

Seen in unbound/lookup3.c.

No change to the documentation since the canonical spelling is still the
same.
 1.6 29-Aug-2021  rillig tests/lint: test lowercase fallthrough
 1.5 29-Aug-2021  rillig lint: accept keyword variant FALL THROUGH as alias to FALLTHROUGH

Seen in archive_string.c, macro WRITE_UC.

No documentation change since the canonical spelling of this keyword
stays the same.
 1.4 29-Aug-2021  rillig tests/lint: test variants of the FALLTHROUGH comment
 1.3 12-Apr-2021  christos Add an example of attribute fallthrough
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 17-Jun-2022  rillig 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'.
 1.7 16-Jun-2022  rillig 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.
 1.6 29-Aug-2021  rillig lint: allow 'fallthrough' as alternative spelling of FALLTHROUGH

Seen in unbound/lookup3.c.

No change to the documentation since the canonical spelling is still the
same.
 1.5 29-Aug-2021  rillig tests/lint: test lowercase fallthrough
 1.4 29-Aug-2021  rillig lint: accept keyword variant FALL THROUGH as alias to FALLTHROUGH

Seen in archive_string.c, macro WRITE_UC.

No documentation change since the canonical spelling of this keyword
stays the same.
 1.3 29-Aug-2021  rillig tests/lint: test variants of the FALLTHROUGH comment
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.7 08-Jun-2024  rillig lint: add details to warnings about negative constant to unsigned
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 16-Jun-2022  rillig 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.
 1.4 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.2 07-Jan-2021  rillig lint: add tests for some messages
 1.1 02-Jan-2021  rillig 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.
 1.8 15-Dec-2024  rillig tests/lint: test negative constant and unsigned type for all operators
 1.7 15-Dec-2024  rillig tests/lint: add practical examples for signedness mismatch
 1.6 08-Jun-2024  rillig branches: 1.6.2;
lint: add details to warnings about negative constant to unsigned
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 16-Jun-2022  rillig 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.
 1.3 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 30-Jan-2021  rillig lint: add tests that trigger a few more messages
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 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.3 16-Jun-2022  rillig 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.
 1.2 24-Jan-2021  rillig lint: add test for message 325, undefined static function
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 24-Jan-2021  rillig lint: add test for message 325, undefined static function
 1.1 02-Jan-2021  rillig 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.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 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.6 16-Jun-2022  rillig 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.
 1.5 28-Feb-2021  rillig tests/lint: force 'expect' annotations
 1.4 28-Feb-2021  rillig lint: make messages for incompatible pointers more specific

Message 153 didn't state obviously which of the pointer types was the
one before conversion (or cast) and which was the resulting type.

Message 229 didn't have any type information at all.
 1.3 28-Feb-2021  rillig tests/lint: add tests for function pointers
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 28-Feb-2021  rillig lint: make messages for incompatible pointers more specific

Message 153 didn't state obviously which of the pointer types was the
one before conversion (or cast) and which was the resulting type.

Message 229 didn't have any type information at all.
 1.2 28-Feb-2021  rillig tests/lint: add tests for function pointers
 1.1 02-Jan-2021  rillig 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.
 1.14 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.13 24-Jun-2023  rillig lint: don't warn about comparison between char and character constant
 1.12 22-Feb-2023  rillig lint: fix confusing message about nonportable character constants
 1.11 26-Feb-2022  rillig tests/lint: sync tests for platform-dependent character comparisons
 1.10 09-Oct-2021  rillig tests/lint: demonstrate wrong warning about nonportable char comparison

Seen in bin/sh/expand.c:273.
 1.9 09-Oct-2021  rillig lint: add more details to warning about nonportable character comparison

Especially when macros are involved, this makes it easier to see that
there is a real problem.

Seen in bin/sh/expand.c:273, where a plain char is compared to numbers
larger than 127.
 1.8 28-Aug-2021  rillig tests/lint: align tests for unsigned char and signed char
 1.7 28-Aug-2021  rillig tests/lint: extend test for nonportable character comparison
 1.6 23-Aug-2021  rillig tests/lint: add tests for integer comparisons
 1.5 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.4 03-Jul-2021  rillig 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.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.10 17-Jun-2022  rillig 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'.
 1.9 09-Oct-2021  rillig tests/lint: demonstrate wrong warning about nonportable char comparison

Seen in bin/sh/expand.c:273.
 1.8 09-Oct-2021  rillig lint: add more details to warning about nonportable character comparison

Especially when macros are involved, this makes it easier to see that
there is a real problem.

Seen in bin/sh/expand.c:273, where a plain char is compared to numbers
larger than 127.
 1.7 28-Aug-2021  rillig tests/lint: align tests for unsigned char and signed char
 1.6 28-Aug-2021  rillig tests/lint: extend test for nonportable character comparison
 1.5 23-Aug-2021  rillig tests/lint: add tests for integer comparisons
 1.4 03-Jul-2021  rillig 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.
 1.3 05-Jan-2021  rillig lint: clean up symbolic operator names that are used in the messages

Including the "p" in the symbolic operator names was questionable, for
several reasons:

1. The "p" could be taken to mean an actual variable name, which is
confusing if the function doesn't have such a variable, or even more
so if the line contains an unrelated variable called "p".

2. For the binary operators, having the "p" mentioned on both sides of
the operator (such as in "p + p") wrongly suggested that both
operands of the expression were the same.

3. The name "p" often stands for a pointer. Most of the operators
don't accept pointers, therefore the name was misleading.

For these reasons, the "p" was removed from the symbolic name of all
operators. This makes several pairs of operators indistinguishable:

INCBEF == INCAFT
DECBEF == DECAFT
UPLUS == PLUS
UMINUS == MINUS
STAR == MULT
AMPER == AND

This is not expected to create any confusion since C programmers are
expected to know these double meanings.

The symbolic names for SHLASS and SHRASS were missing the '=' before.
This was added since omitting it was probably an oversight.
 1.2 03-Jan-2021  rillig lint: add tests for some of the messages
 1.1 02-Jan-2021  rillig 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.
 1.13 08-Jul-2023  rillig tests/lint: fix a few ilp32 tests
 1.12 24-Jun-2023  rillig lint: don't warn about comparison between char and character constant
 1.11 27-Feb-2023  rillig tests/lint: sync test for nonportable character comparisons

Message 230 was changed on 2023-02-22 but only tested on signed char
platforms.
 1.10 22-Feb-2023  rillig lint: fix confusing message about nonportable character constants
 1.9 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.8 14-Mar-2022  rillig tests/lint: fix test about "non-portable character constant" on uchar

The warning is wrong, and it has been for a long time. For now just fix
the test to match the actual output. Seen on evbarm, which is one of
the platforms where a plain char is unsigned.

Noticed by Martin.
 1.7 26-Feb-2022  rillig tests/lint: sync tests for platform-dependent character comparisons
 1.6 16-Dec-2021  rillig tests/lint: ensure that tests on a message mention this message
 1.5 16-Dec-2021  rillig tests/lint: fix test on platforms where char is unsigned

In tree.c 1.385 from 2021-10-09, the format of the message changed. The
test for platforms where char is unsigned was not updated in that commit
because I had forgotten about it, and because lint1/check-msgs.lua only
checks the message in tests named exacty msg_000.c, but not msg_000_*.c.

Found by martin@.
 1.4 28-Aug-2021  rillig tests/lint: align tests for unsigned char and signed char
 1.3 28-Aug-2021  rillig tests/lint: extend test for nonportable character comparison
 1.2 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.1 03-Jul-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 14-Mar-2022  rillig tests/lint: fix test about "non-portable character constant" on uchar

The warning is wrong, and it has been for a long time. For now just fix
the test to match the actual output. Seen on evbarm, which is one of
the platforms where a plain char is unsigned.

Noticed by Martin.
 1.3 16-Dec-2021  rillig tests/lint: fix test on platforms where char is unsigned

In tree.c 1.385 from 2021-10-09, the format of the message changed. The
test for platforms where char is unsigned was not updated in that commit
because I had forgotten about it, and because lint1/check-msgs.lua only
checks the message in tests named exacty msg_000.c, but not msg_000_*.c.

Found by martin@.
 1.2 28-Aug-2021  rillig tests/lint: align tests for unsigned char and signed char
 1.1 03-Jul-2021  rillig 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.
 1.9 28-Sep-2024  rillig lint: handle __attribute__((__unused__)) for functions and variables

Previously, lint ignored the '__unused' marker, requiring its own /*
ARGSUSED */ marker instead.

Previously, attributes were interpreted as soon as the closing
parenthesis was parsed. For a function definition such as '__unused
static void f(void) {}', this was too early, as the attribute was not
connected to the function, as the function was not parsed yet.

Now, the 'unused' attribute is passed around by the parser, until it is
merged into the declarator where it belongs. Due to an inaccuracy in
the grammar, the 'used' attribute has to be passed through a
parameter_list, even though a parameter list is not related to
attributes. Still, it's better than before.
 1.8 27-Sep-2024  rillig tests/lint: test unused parameters and local variables
 1.7 26-Sep-2024  rillig tests/lint: test more cases of unused parameters and local variables
 1.6 09-Jul-2023  rillig branches: 1.6.2;
lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.5 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.4 16-Jun-2022  rillig 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.
 1.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 09-Apr-2021  rillig lint: quote placeholders in messages for unused variables
 1.2 30-Jan-2021  rillig lint: remove message 189, add tests for a few other messages

Message 189 would have applied to traditional C and was supposed to
detect assignments between struct and union types. The corresponding
check had never been implemented though.

Traditional C has been superseded for 30 years now, therefore there is no
point in adding this check retroactively.
 1.1 02-Jan-2021  rillig 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.
 1.7 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.6 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.5 11-Jul-2021  rillig lint: add quotes around placeholders in message 23 and 232
 1.4 11-Jul-2021  rillig lint: support __attribute__((hot))

The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 10-Jan-2021  rillig lint: use message 232 for unused label in function

This message had been defined but not used before.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 11-Jul-2021  rillig lint: add quotes around placeholders in message 23 and 232
 1.2 10-Jan-2021  rillig lint: use message 232 for unused label in function

This message had been defined but not used before.
 1.1 02-Jan-2021  rillig 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.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add tests for messages that lack quotes
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add tests for messages that lack quotes
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 28-Sep-2024  rillig lint: treat __attribute__((__constructor__)) functions as used

Seen in jemalloc.c.
 1.6 26-Sep-2024  rillig tests/lint: demonstrate wrong warning for constructor function

Seen in jemalloc.
 1.5 07-Jul-2023  rillig branches: 1.5.2;
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.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add tests for messages that lack quotes
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add tests for messages that lack quotes
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 11-Jun-2022  rillig lint: add quotes around placeholders for a few more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 28-Mar-2023  rillig branches: 1.6.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 16-Jun-2022  rillig 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.
 1.4 29-Mar-2021  rillig tests/lint: test initialization of union in traditional C
 1.3 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 29-Mar-2021  rillig tests/lint: test initialization of union in traditional C
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.10 10-Apr-2025  rillig lint: do not warn about constant operand of '!'

Like its related warning about a constant condition, the purpose of this
warning is unclear, and suppressing the warning requires special lint
comments, thus cluttering the code.

The message itself is still kept in err.c to keep the '-X 239' option
valid. These LINTFLAGS will be removed in a follow-up commit.

The lint comments /* CONSTCOND */, as well as its more verbose forms /*
CONSTANTCOND */ and /* CONSTANTCONDITION */ are no longer needed and can
be removed.
 1.9 06-Apr-2025  rillig lint: remove warning about 'constant in conditional context'

In a full NetBSD build, this warning occurs about 2400 times, making it
the top 9 warning overall. There is no evidence though that this
warning detects any real bugs, so the noise it makes is not warranted.

In this first step, the warning is still listed in the lint(7) manual
page, as removing it from there would immediately make all places with
"LINTFLAGS += -X 161" fail. These '-X 161' flags cannot be removed
first because then, the warning would step in and make the build fail.

The next step is to clean up the "-X 161" options from all LINTFLAGS,
and then the final step is to remove the warning from err.c.
 1.8 02-Aug-2023  rillig branches: 1.8.2;
lint: distinguish between arguments and parameters
 1.7 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.6 16-Jun-2022  rillig 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.
 1.5 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.4 02-Apr-2021  rillig lint: reword message about constant argument to '!'

In the other messages, operators are typically written in their literal
form as well. Using single quotes disambiguates them from normal
punctuation.
 1.3 02-Apr-2021  rillig tests/lint: add test for constant argument to '!'
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig 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.
 1.4 02-Apr-2021  rillig lint: reword message about constant argument to '!'

In the other messages, operators are typically written in their literal
form as well. Using single quotes disambiguates them from normal
punctuation.
 1.3 02-Apr-2021  rillig tests/lint: add test for constant argument to '!'
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.7 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.6 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.5 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.4 01-Jul-2022  rillig lint: add quotes around operator in message 138, remove message 240

Message 138 doesn't occur in practice, it was the last one that was
missing the quotes around the placeholder.

Message 240 was also missing the quotes, but it was not reachable. There
was also no apparent benefit in warning about 'assignment of different
structures' when the message about 'assignment type mismatch' serves the
same purpose.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.11 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.10 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9 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.8 16-Jun-2022  rillig 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.
 1.7 30-Oct-2021  rillig 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.
 1.6 16-Aug-2021  rillig tests/lint: test arithmetic promotions and enums
 1.5 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.4 27-Feb-2021  rillig tests/lint: remove stray warning 278 from test for warning 241
 1.3 27-Feb-2021  rillig tests/lint: add test for 'dubious operation on enum' [241]
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig 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.
 1.4 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.3 27-Feb-2021  rillig tests/lint: remove stray warning 278 from test for warning 241
 1.2 27-Feb-2021  rillig tests/lint: add test for 'dubious operation on enum' [241]
 1.1 02-Jan-2021  rillig 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.
 1.8 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 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.5 29-Nov-2021  rillig tests/lint: demonstrate non-enum warning for enum type mismatch

Seen in usr.bin/make/job.c:2122.
 1.4 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.3 27-Feb-2021  rillig tests/lint: add tests for enum/int mismatch
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 29-Nov-2021  rillig tests/lint: demonstrate non-enum warning for enum type mismatch

Seen in usr.bin/make/job.c:2122.
 1.3 14-Aug-2021  rillig lint: allow initialization of struct with constant member

The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.

The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
 1.2 27-Feb-2021  rillig tests/lint: add tests for enum/int mismatch
 1.1 02-Jan-2021  rillig 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.
 1.6 09-Jul-2023  rillig lint: in the warning about ordered enums, mention the affected type
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 31-Jan-2021  rillig lint: add a few more tests
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 31-Jan-2021  rillig lint: add a few more tests
 1.1 02-Jan-2021  rillig 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.
 1.5 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.4 07-Jul-2023  rillig branches: 1.4.2;
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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 16-Jun-2022  rillig 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.
 1.4 28-Feb-2021  rillig lint: add type information for 'incompatible struct pointers'
 1.3 28-Feb-2021  rillig tests/lint: add test for 'illegal structure pointer combination'
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 16-Jun-2022  rillig 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.
 1.4 28-Feb-2021  rillig lint: output precise type information for struct/union/enum

Previously, 'typedef enum { E } name' was output as 'name', which
omitted the information that this was an enum type. Now it is output as
'enum typedef name'.

Previously, 'typedef struct { int member; } name' was output as 'struct
<unnamed>', which omitted the typedef name. Now it is output as 'struct
typedef name'.
 1.3 28-Feb-2021  rillig lint: add type information for 'incompatible struct pointers'
 1.2 28-Feb-2021  rillig tests/lint: add test for 'illegal structure pointer combination'
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.6 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.5 07-Jul-2023  rillig branches: 1.5.2;
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.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.35 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.34 28-Sep-2024  rillig lint: reword warning about cast between unrelated pointer types

The phrase "may be troublesome" was too unspecific to be useful.
 1.33 07-Aug-2023  rillig branches: 1.33.2;
tests/lint: show that portable mode depends on PTRDIFF_TSPEC

Since 2023.07.08.12.45.43, lint warns in lib/libkvm on i386.
 1.32 14-Jul-2023  rillig lint: clean up comments, add a test for the '?:' operator
 1.31 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.30 05-Jul-2023  rillig tests/lint: add platform-specific tests for troublesome pointer casts
 1.29 22-Apr-2023  rillig lint: don't warn about cast between union and one of its member types

Seen in src/sbin/newfs_udf/udf_core.c for context.anchors.
 1.28 22-Apr-2023  rillig tests/lint: add test for conversions to and from a union type

Additionally, fix the line numbers in another test.
 1.27 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.26 24-Jun-2022  rillig lint: do not warn about pointer casts to array types

If the (recursive) element type of the array is compatible, that's good
enough. Even after the previous commits, this warning is the one that
occurs most in a standard NetBSD build, and it is generally ignored.
For now, focus on reducing the number of false positives to an
acceptable level.
 1.25 24-Jun-2022  rillig tests/lint: demonstrate another warning about pointer casts
 1.24 24-Jun-2022  rillig lint: allow pointer cast between compatible structs

Lint already allowed pointer casts from 'struct counter' to 'struct
counter_impl'. Now it also allows the other direction.
 1.23 24-Jun-2022  rillig tests/lint: demonstrate warning for cast between compatible structs
 1.22 24-Jun-2022  rillig lint: do not warn about pointer cast between sockaddr variants
 1.21 24-Jun-2022  rillig tests/lint: demonstrate pointer casts between sockaddr variants
 1.20 24-Jun-2022  rillig lint: allow pointer cast from char to struct/union
 1.19 24-Jun-2022  rillig tests/lint: demonstrate dubious warnings for pointer casts

Casting a 'pointer to char' to a 'pointer to anything else' is already
allowed, except for 'pointer to struct/union'. The cause for this
inconsistency is the wrong order of checks in
'should_warn_about_pointer_cast'.
 1.18 16-Jun-2022  rillig 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.
 1.17 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.16 15-Jul-2021  rillig lint: allow pointer casts from 'char *' and 'unsigned char *'

For the sake of traditional code that did not yet migrate to using 'void
*' for arbitrary pointers.

In the standard NetBSD build, this reduces the number of lint warnings
by around 7000, of 57000 total.
 1.15 15-Jul-2021  rillig tests/lint: demonstrate questionable warnings for pointer casts
 1.14 10-Jul-2021  rillig lint: rename clrtyp/deftyp to begin_type/end_type

The abbreviations clr/def did not make it obvious that these two
functions or grammar rules form pairs.

No functional change.
 1.13 09-Apr-2021  rillig lint: do not warn about pointer conversion to or from incomplete type

This cuts down the warnings in a NetBSD release build by about 38,000.
 1.12 09-Apr-2021  rillig tests/lint: document where the 38,000 lint warnings come from
 1.11 08-Apr-2021  rillig tests/lint: refine comment and function name in test for pointer cast

In a typical NetBSD build, there are about 100,000 lint warnings. About
50,000 of them are warning 247. About 38,000 of these are from OpenSSL
and may be fixed by now.
 1.10 08-Apr-2021  rillig lint: don't warn about cast between pointers to compatible structs
 1.9 08-Apr-2021  rillig tests/lint: add test for struct pointer cast
 1.8 30-Mar-2021  rillig tests/lint: remove outdated comments
 1.7 26-Mar-2021  rillig lint: allow pointer cast to 'char *' and 'unsigned char *'

This reduces the number of warnings in the regular NetBSD build by 5560.
 1.6 26-Mar-2021  rillig tests/lint: add tests for warning about cast to character types
 1.5 14-Mar-2021  rillig tests/lint: document how lint discards the typedef name in 247
 1.4 14-Mar-2021  rillig tests/lint: add test for message 247 for pointer to unnamed struct
 1.3 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.33.2.1 02-Aug-2025  perseant Sync with HEAD
 1.15 17-Jun-2022  rillig 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'.
 1.14 16-Jun-2022  rillig 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.
 1.13 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.12 15-Jul-2021  rillig lint: allow pointer casts from 'char *' and 'unsigned char *'

For the sake of traditional code that did not yet migrate to using 'void
*' for arbitrary pointers.

In the standard NetBSD build, this reduces the number of lint warnings
by around 7000, of 57000 total.
 1.11 15-Jul-2021  rillig tests/lint: demonstrate questionable warnings for pointer casts
 1.10 09-Apr-2021  rillig lint: do not warn about pointer conversion to or from incomplete type

This cuts down the warnings in a NetBSD release build by about 38,000.
 1.9 09-Apr-2021  rillig lint: for structs and unions, include incompleteness in the type name

This mainly helps to assess the situation where lint warns that a
pointer cast "may be troublesome", see msg_247.exp.
 1.8 09-Apr-2021  rillig tests/lint: document where the 38,000 lint warnings come from
 1.7 08-Apr-2021  rillig lint: don't warn about cast between pointers to compatible structs
 1.6 08-Apr-2021  rillig tests/lint: add test for struct pointer cast
 1.5 26-Mar-2021  rillig lint: allow pointer cast to 'char *' and 'unsigned char *'

This reduces the number of warnings in the regular NetBSD build by 5560.
 1.4 26-Mar-2021  rillig tests/lint: add tests for warning about cast to character types
 1.3 14-Mar-2021  rillig tests/lint: document how lint discards the typedef name in 247
 1.2 14-Mar-2021  rillig tests/lint: add test for message 247 for pointer to unnamed struct
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Sep-2024  rillig lint: reword warning about cast between unrelated pointer types

The phrase "may be troublesome" was too unspecific to be useful.
 1.5 07-Aug-2023  rillig branches: 1.5.2;
tests/lint: show that portable mode depends on PTRDIFF_TSPEC

Since 2023.07.08.12.45.43, lint warns in lib/libkvm on i386.
 1.4 08-Jul-2023  rillig lint: warn about pointer casts between different kinds of types

Pointer casts from an integer type to a floating-point type and vice
versa get a 'maybe troublesome' warning now. The previous assumption
that all types of the same bit-size are convertible may have been valid
from a technical point of view, but still such code should get more
attention.

The rules for struct and union types could be made more fine-grained
later, if the need arises. To suppress this warning, it's always
possible to cast to an intermediate 'void *'.
 1.3 08-Jul-2023  rillig tests/lint: fix a few ilp32 tests
 1.2 05-Jul-2023  rillig tests/lint: spell platform identifiers for 'long double' consistently

The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
 1.1 05-Jul-2023  rillig tests/lint: add platform-specific tests for troublesome pointer casts
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 28-Sep-2024  rillig lint: reword warning about cast between unrelated pointer types

The phrase "may be troublesome" was too unspecific to be useful.
 1.5 07-Aug-2023  rillig branches: 1.5.2;
tests/lint: show that portable mode depends on PTRDIFF_TSPEC

Since 2023.07.08.12.45.43, lint warns in lib/libkvm on i386.
 1.4 08-Jul-2023  rillig lint: warn about pointer casts between different kinds of types

Pointer casts from an integer type to a floating-point type and vice
versa get a 'maybe troublesome' warning now. The previous assumption
that all types of the same bit-size are convertible may have been valid
from a technical point of view, but still such code should get more
attention.

The rules for struct and union types could be made more fine-grained
later, if the need arises. To suppress this warning, it's always
possible to cast to an intermediate 'void *'.
 1.3 06-Jul-2023  rillig tests/lint: ensure consistent preprocessor filenames in tests

The deviations often happen when copying or renaming tests.
 1.2 05-Jul-2023  rillig tests/lint: spell platform identifiers for 'long double' consistently

The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
 1.1 05-Jul-2023  rillig tests/lint: add platform-specific tests for troublesome pointer casts
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 28-Sep-2024  rillig lint: reword warning about cast between unrelated pointer types

The phrase "may be troublesome" was too unspecific to be useful.
 1.5 07-Aug-2023  rillig branches: 1.5.2;
tests/lint: show that portable mode depends on PTRDIFF_TSPEC

Since 2023.07.08.12.45.43, lint warns in lib/libkvm on i386.
 1.4 08-Jul-2023  rillig lint: warn about pointer casts between different kinds of types

Pointer casts from an integer type to a floating-point type and vice
versa get a 'maybe troublesome' warning now. The previous assumption
that all types of the same bit-size are convertible may have been valid
from a technical point of view, but still such code should get more
attention.

The rules for struct and union types could be made more fine-grained
later, if the need arises. To suppress this warning, it's always
possible to cast to an intermediate 'void *'.
 1.3 08-Jul-2023  rillig lint: do not use portable type sizes in integer constraints

This reverts the change from tree.c 1.547 from 2023-07-03. Back then, I
didn't know that the actual value from a type's 'portable size in bits'
was not supposed to be used.
 1.2 05-Jul-2023  rillig tests/lint: spell platform identifiers for 'long double' consistently

The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
 1.1 05-Jul-2023  rillig tests/lint: add platform-specific tests for troublesome pointer casts
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 28-Sep-2024  rillig lint: reword warning about cast between unrelated pointer types

The phrase "may be troublesome" was too unspecific to be useful.
 1.1 07-Aug-2023  rillig branches: 1.1.2;
tests/lint: show that portable mode depends on PTRDIFF_TSPEC

Since 2023.07.08.12.45.43, lint warns in lib/libkvm on i386.
 1.1.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 21-Jan-2023  rillig lint: add test for floating constant overflow
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.16 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.15 28-Jan-2024  rillig branches: 1.15.2;
tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.14 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.13 29-Jan-2023  rillig lint: properly clean up when leaving a function definition
 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 16-Jun-2022  rillig 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.
 1.10 31-May-2022  rillig lint: fix null pointer dereference after syntax error

Found by afl, starting with the malformed input '/**/f=({;/**/};}' that
no longer crashes. This input led to 'f=({L:;}', which is at least a
syntactically valid prefix of a translation unit, containing a GCC
statement expression with an unused label. The error message for this
unused label assumed that it would always be inside a function
definition.

While here, document incomplete recovery after syntax errors, in
msg_249.c.
 1.9 15-Jan-2022  rillig lint: warn about unreachable null statements

This warning flags the second semicolon of 'return;;' as being
unreachable. It does not warn about these superfluous semicolons in
general though.

Seen in usr.bin/make/bmake_malloc.c.
 1.8 10-Jul-2021  rillig lint: rename clrtyp/deftyp to begin_type/end_type

The abbreviations clr/def did not make it obvious that these two
functions or grammar rules form pairs.

No functional change.
 1.7 10-Jul-2021  rillig lint: do not allow struct{const;}

In traditional C, a struct member was defined syntactically as
'type-specifier struct-declarator-list', the concept of a type-qualifier
was not known back then.

C90 invented the type-qualifier 'const' and relaxed the syntactic
requirement for struct member declarations by allowing 'const x'. Having
only a type-qualifier without an actual type may be regarded as an
"incomplete type", which would be forbidden by C90 and later.

Anyway, this doesn't occur in practice anyway, so there is no need for
lint to try to parse it. This removes a bit of dead code, since a
type-qualifier-list can never have type struct or union.
 1.6 10-Jul-2021  rillig lint: fix assertion failure for malformed member declaration
 1.5 08-Jul-2021  rillig tests/lint: test error recovery of the parser
 1.4 08-Jul-2021  rillig tests/lint: add test coverage for some parse errors
 1.3 19-Jun-2021  rillig lint: fix assertion failure after malformed statement

Found using afl.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.15.2.1 02-Aug-2025  perseant Sync with HEAD
 1.10 17-Jun-2022  rillig 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'.
 1.9 16-Jun-2022  rillig 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.
 1.8 31-May-2022  rillig lint: fix null pointer dereference after syntax error

Found by afl, starting with the malformed input '/**/f=({;/**/};}' that
no longer crashes. This input led to 'f=({L:;}', which is at least a
syntactically valid prefix of a translation unit, containing a GCC
statement expression with an unused label. The error message for this
unused label assumed that it would always be inside a function
definition.

While here, document incomplete recovery after syntax errors, in
msg_249.c.
 1.7 15-Jan-2022  rillig lint: warn about unreachable null statements

This warning flags the second semicolon of 'return;;' as being
unreachable. It does not warn about these superfluous semicolons in
general though.

Seen in usr.bin/make/bmake_malloc.c.
 1.6 10-Jul-2021  rillig lint: do not allow struct{const;}

In traditional C, a struct member was defined syntactically as
'type-specifier struct-declarator-list', the concept of a type-qualifier
was not known back then.

C90 invented the type-qualifier 'const' and relaxed the syntactic
requirement for struct member declarations by allowing 'const x'. Having
only a type-qualifier without an actual type may be regarded as an
"incomplete type", which would be forbidden by C90 and later.

Anyway, this doesn't occur in practice anyway, so there is no need for
lint to try to parse it. This removes a bit of dead code, since a
type-qualifier-list can never have type struct or union.
 1.5 10-Jul-2021  rillig lint: fix assertion failure for malformed member declaration
 1.4 08-Jul-2021  rillig tests/lint: add test coverage for some parse errors
 1.3 19-Jun-2021  rillig lint: fix assertion failure after malformed statement

Found using afl.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.5 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.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 24-Apr-2022  rillig lint: error out on declarations with implicit int type
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 08-Jun-2024  rillig tests/lint: remove unused lint1-skip-if selector
 1.7 27-Jan-2024  rillig tests/lint: test integer constants in different language levels
 1.6 02-Jul-2023  rillig lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 28-Aug-2021  rillig tests/lint: disable test for message 252 on ILP32 platforms
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 28-Aug-2021  rillig tests/lint: disable test for message 252 on ILP32 platforms
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 02-Feb-2024  rillig lint: make newline in a string literal an error in C90 and later
 1.4 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.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.5 02-Feb-2024  rillig lint: fix debug output for strings, reduce code size

The debug output contained too many newlines.

The buffer functions were built into lint2 even though they weren't
used.

Enable the query for invisible characters in string literals, to make
sure that a newline in a string literal does not trigger that query.
 1.4 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.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 08-Dec-2024  rillig lint: warn about do-while macros that end with a semicolon
 1.6 11-Aug-2023  rillig branches: 1.6.2;
tests/lint: test parsing of preprocessing directives
 1.5 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.7 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 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.4 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.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.6 02-Feb-2024  rillig lint: make newline in a string literal an error in C90 and later
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.25 09-Jun-2024  rillig lint: warn about lossy floating point constant to integer conversions
 1.24 08-Jun-2024  rillig tests/lint: group tests by topic
 1.23 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.22 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.21 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.20 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.19 02-Sep-2021  rillig lint: align tests for message 259, clarify its purpose
 1.18 02-Sep-2021  rillig lint: fix unintended warning for converting long long to signed char
 1.17 02-Sep-2021  rillig tests/lint: demonstrate unintended prototype warning for signed char
 1.16 31-Aug-2021  rillig tests/lint: add cross-references to message 297

The check for lossy integer conversions is already implemented, it's
just not activated in the default NetBSD build.
 1.15 31-Aug-2021  rillig 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.
 1.14 31-Aug-2021  rillig tests/lint: add missing test cases for integer conversions

While adding the missing test cases, I re-read the comments and
discarded several of them, since converting a signed value to an
unsigned type can be lossy as well, which warrants a warning.
 1.13 30-Aug-2021  rillig tests/lint: test passing sizeof(int) to parameter type 'unsigned int'

Seen in usr.sbin/inetd/inetd.c, which calls getnameinfo and passes
sizeof(buf).
 1.12 21-Aug-2021  rillig tests/lint: add more test cases for lossy integer conversion
 1.11 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.10 21-Aug-2021  rillig tests/lint: add tests for conversion from signed to unsigned
 1.9 04-Jul-2021  rillig tests/lint: align tests for argument conversion to each other
 1.8 29-Jun-2021  rillig 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".
 1.7 29-Jun-2021  rillig 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.
 1.6 04-Feb-2021  rillig lint: update message text for 259 in test

That's the one place that is not checked for matching the actual message
by my usual pre-commit checks.
 1.5 04-Feb-2021  rillig lint: add back "due to prototype" to message 259

That message is only supposed to warn about compatibility to traditional
C, in case the function should ever be compiled without its prototype
being in effect. All other type checks are supposed to be in another
function, as documented, but that type check misses to report a few
error-prone type combinations (long to char, long to int).

30 years after the introduction of prototypes with C90, almost all
existing code uses prototypes. The warning has thus lost most of its
usefulness and can rather be confusing since a conversion from 'char' to
'long' is not problematic with prototypes in action, and the probability
of the code being backported to a pre-C90 compiler is diminishingly
small.

The words "due to prototype" now serve as a hint again. The proper fix
could be to suppress this warning in C99 mode since that's far enough
from traditional C.
 1.4 31-Jan-2021  rillig lint: reword message 259 about function argument conversion

The words "due to prototype" are an anachronism from the 1990s.
Nowadays every function is defined using a prototype, which makes these
words redundant.
 1.3 31-Jan-2021  rillig lint: make warning about function argument conversion more detailed

For every conversion it is useful to know both the source and the target
type since these are not always obvious from the code.

The only surprise is the warning in d_gcc_extension. The conversion
there is from 'double' to 'long double', which is a lossless conversion.
This may be a bug in lint.
 1.2 30-Jan-2021  rillig lint: add test for message 259 about implicit conversions
 1.1 02-Jan-2021  rillig 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.
 1.17 17-Jun-2022  rillig 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'.
 1.16 02-Sep-2021  rillig lint: align tests for message 259, clarify its purpose
 1.15 02-Sep-2021  rillig lint: fix unintended warning for converting long long to signed char
 1.14 02-Sep-2021  rillig tests/lint: demonstrate unintended prototype warning for signed char
 1.13 31-Aug-2021  rillig tests/lint: add cross-references to message 297

The check for lossy integer conversions is already implemented, it's
just not activated in the default NetBSD build.
 1.12 31-Aug-2021  rillig 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.
 1.11 31-Aug-2021  rillig tests/lint: add missing test cases for integer conversions

While adding the missing test cases, I re-read the comments and
discarded several of them, since converting a signed value to an
unsigned type can be lossy as well, which warrants a warning.
 1.10 30-Aug-2021  rillig tests/lint: test passing sizeof(int) to parameter type 'unsigned int'

Seen in usr.sbin/inetd/inetd.c, which calls getnameinfo and passes
sizeof(buf).
 1.9 21-Aug-2021  rillig tests/lint: add more test cases for lossy integer conversion
 1.8 21-Aug-2021  rillig tests/lint: add tests for conversion from signed to unsigned
 1.7 04-Jul-2021  rillig tests/lint: align tests for argument conversion to each other
 1.6 29-Jun-2021  rillig 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.
 1.5 04-Feb-2021  rillig lint: add back "due to prototype" to message 259

That message is only supposed to warn about compatibility to traditional
C, in case the function should ever be compiled without its prototype
being in effect. All other type checks are supposed to be in another
function, as documented, but that type check misses to report a few
error-prone type combinations (long to char, long to int).

30 years after the introduction of prototypes with C90, almost all
existing code uses prototypes. The warning has thus lost most of its
usefulness and can rather be confusing since a conversion from 'char' to
'long' is not problematic with prototypes in action, and the probability
of the code being backported to a pre-C90 compiler is diminishingly
small.

The words "due to prototype" now serve as a hint again. The proper fix
could be to suppress this warning in C99 mode since that's far enough
from traditional C.
 1.4 31-Jan-2021  rillig lint: reword message 259 about function argument conversion

The words "due to prototype" are an anachronism from the 1990s.
Nowadays every function is defined using a prototype, which makes these
words redundant.
 1.3 31-Jan-2021  rillig lint: make warning about function argument conversion more detailed

For every conversion it is useful to know both the source and the target
type since these are not always obvious from the code.

The only surprise is the warning in d_gcc_extension. The conversion
there is from 'double' to 'long double', which is a lossless conversion.
This may be a bug in lint.
 1.2 30-Jan-2021  rillig lint: add test for message 259 about implicit conversions
 1.1 02-Jan-2021  rillig 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.
 1.6 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 02-Sep-2021  rillig lint: align tests for message 259, clarify its purpose
 1.2 31-Aug-2021  rillig tests/lint: add cross-references to message 297

The check for lossy integer conversions is already implemented, it's
just not activated in the default NetBSD build.
 1.1 31-Aug-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 02-Sep-2021  rillig lint: align tests for message 259, clarify its purpose
 1.2 31-Aug-2021  rillig tests/lint: add cross-references to message 297

The check for lossy integer conversions is already implemented, it's
just not activated in the default NetBSD build.
 1.1 31-Aug-2021  rillig 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.
 1.10 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.9 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.8 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.7 16-Apr-2022  rillig tests/lint: fix tests on platforms other than x86_64

In msg_259_ilp32.c 1.6 from 2022-04-15, I removed the option -S from the
test in order to keep the message 259, but I forgot to fix the C99-style
comment as well.

In platform_int.c, the default lint option -S no longer generated
warning 259, so remove that option.
 1.6 15-Apr-2022  rillig lint: in C99 mode, do not warn about non-prototype conversions

Message 259 is "argument #%d is converted from '%s' to '%s' due to
prototype", and it is intended to warn about compatibility between
traditional C where functions had no prototypes and standard C where
functions have prototypes.

Running lint in C99 mode is further away from traditional C than running
lint in C90 mode, so that warning doesn't make sense for C99. There are
still some inconsistencies in the 5 language version modes that lint
offers:

-t for traditional C
(no option) for migrating traditional C to C90
-s for C90 code
-S for C99 code
-Ac11 for C11 code

By disabling warning 259 in C99 mode, a typical NetBSD build produces
14.500 fewer warnings than before, of about 100.000 total.

Message 259 overlaps with message 298 "conversion from '%s' to '%s' may
lose accuracy, arg #%d", and in some cases of potentially lossy
conversions, lint now produces none of these messages. In some other
cases, these warnings were reported redundantly. The cases where
message 298 makes sense will be added back later, as needed.
 1.5 02-Sep-2021  rillig lint: align tests for message 259, clarify its purpose
 1.4 31-Aug-2021  rillig tests/lint: add cross-references to message 297

The check for lossy integer conversions is already implemented, it's
just not activated in the default NetBSD build.
 1.3 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.2 29-Jun-2021  rillig 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".
 1.1 29-Jun-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 02-Sep-2021  rillig lint: align tests for message 259, clarify its purpose
 1.2 31-Aug-2021  rillig tests/lint: add cross-references to message 297

The check for lossy integer conversions is already implemented, it's
just not activated in the default NetBSD build.
 1.1 29-Jun-2021  rillig 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.
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 16-Aug-2021  rillig lint: add more details to message about redeclared tag
 1.3 18-Apr-2021  rillig lint: document wrong location information in diagnostics
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 16-Aug-2021  rillig lint: add more details to message about redeclared tag
 1.3 18-Apr-2021  rillig lint: document wrong location information in diagnostics
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 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.5 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.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add test for 'previous definition' message
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add test for 'previous definition' message
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig 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.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.6 02-Feb-2024  rillig branches: 1.6.2;
tests/lint: test lexing of characters and strings
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig 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.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 29-Jun-2021  rillig tests/lint: add tests for the lexical analysis
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.5 02-Feb-2024  rillig branches: 1.5.2;
tests/lint: test lexing of characters and strings
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 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.4 22-Dec-2021  rillig lint: use C90 instead of C89 when referring to the C standard
 1.3 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.2 03-Jan-2021  rillig lint: add test for 265 "c89 C does not support 'long long'"
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 22-Dec-2021  rillig lint: use C90 instead of C89 when referring to the C standard
 1.2 03-Jan-2021  rillig lint: add test for 265 "c89 C does not support 'long long'"
 1.1 02-Jan-2021  rillig 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.
 1.6 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.5 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.4 28-Mar-2023  rillig branches: 1.4.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.11 14-Sep-2025  rillig lint: do not preserve bit-field information in integer promotions

The bit-field information was wrongly added back in 2021. At that time,
the integer constraints had not been implemented yet, so it was a
straight-forward idea to implement value restrictions using the type
system and propagage these through the expressions.

Due to preserving the bit-field information, some lint warnings
contained wrong type information. These warnings are now fixed.
 1.10 14-Sep-2025  rillig lint: add more type details to several messages

In most expressions, the integer promotions are performed on the
operands, making the actual type different from the "visible" type of an
operand. To properly explain the situation, mention the type before the
integer promotions in case it differs from the resulting type.
 1.9 20-Feb-2025  rillig lint: support __attribute__((__mode__(TI)))

This fixes the wrong lint warnings about the shift amount being greater
than the type size in compiler_rt/popcountti2.c.
 1.8 12-Mar-2024  rillig branches: 1.8.2;
lint: fix warning about loss of conversion for unsigned bit-fields

Since decl.c 1.180 from 2021-05-02.
 1.7 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.6 19-Aug-2022  rillig lint: add more details to message about large bit-shifts
 1.5 19-Aug-2022  rillig tests/lint: demonstrate wrong warning about bit-shift
 1.4 16-Jun-2022  rillig 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.
 1.3 09-Apr-2021  rillig tests/lint: test bit-shift amount equal to the type's width
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 09-Apr-2021  rillig tests/lint: test bit-shift amount equal to the type's width
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 12-Apr-2025  rillig lint: reword messages that apply to traditional C
 1.5 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.4 28-Mar-2023  rillig branches: 1.4.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 22-Aug-2021  rillig lint: use standard quotes in messages 203 and 271
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 22-Aug-2021  rillig lint: use standard quotes in messages 203 and 271
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.1 08-Jul-2021  rillig 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.
 1.2 17-Jun-2022  rillig 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'.
 1.1 08-Jul-2021  rillig 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.
 1.4 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.4 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.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 22-Aug-2021  rillig tests/lint: test messages 268 to 274
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 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.5 16-Jun-2022  rillig 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.
 1.4 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.3 28-Feb-2021  rillig tests/lint: add test for unconst pointer cast
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 28-Feb-2021  rillig tests/lint: add test for unconst pointer cast
 1.1 02-Jan-2021  rillig 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.
 1.6 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.9 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.8 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 16-Jun-2022  rillig 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.
 1.5 16-Aug-2021  rillig tests/lint: test arithmetic promotions and enums
 1.4 27-Feb-2021  rillig tests/lint: add tests for enum/int mismatch
 1.3 22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 16-Aug-2021  rillig tests/lint: test arithmetic promotions and enums
 1.2 27-Feb-2021  rillig tests/lint: add tests for enum/int mismatch
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig 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.
 1.3 27-Feb-2021  rillig tests/lint: add tests for enum/int mismatch
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 27-Feb-2021  rillig tests/lint: add tests for enum/int mismatch
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig 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.
 1.3 27-Feb-2021  rillig tests/lint: add tests for enum/int mismatch
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 27-Feb-2021  rillig tests/lint: add tests for enum/int mismatch
 1.1 02-Jan-2021  rillig 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.
 1.9 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.8 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.7 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.6 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.5 05-Sep-2021  rillig tests/lint: document placement of lint comments
 1.4 05-Sep-2021  rillig tests/lint: clean up test for misplaced lint comments

A varargs comment that appears in the function body is already covered
by varargs_bad_body. Cleaning up this test makes sure that the warning
is indeed triggered by the comment in the parameters declaration.
 1.3 30-Aug-2021  rillig tests/lint: test varargs, printflike, scanflike
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 05-Sep-2021  rillig tests/lint: document placement of lint comments
 1.4 05-Sep-2021  rillig tests/lint: clean up test for misplaced lint comments

A varargs comment that appears in the function body is already covered
by varargs_bad_body. Cleaning up this test makes sure that the warning
is indeed triggered by the comment in the parameters declaration.
 1.3 30-Aug-2021  rillig tests/lint: test varargs, printflike, scanflike
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.7 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.6 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.5 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.4 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.3 30-Aug-2021  rillig tests/lint: test varargs, printflike, scanflike
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 30-Aug-2021  rillig tests/lint: test varargs, printflike, scanflike
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.7 03-Jan-2025  rillig lint: add detail to message about obsolete identifier list
 1.6 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Jun-2022  rillig 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.
 1.3 15-Jun-2021  rillig tests/lint: add test for previous prototype declaration
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 16-Jun-2022  rillig 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.
 1.3 15-Jun-2021  rillig tests/lint: add test for previous prototype declaration
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 10-Mar-2025  rillig lint: in C99 mode and later, warn about non-prototype functions

Suggested by Christos Zoulas.
 1.3 16-Jun-2022  rillig branches: 1.3.4;
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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 10-Mar-2025  rillig lint: in C99 mode and later, warn about non-prototype functions

Suggested by Christos Zoulas.
 1.3 16-Jun-2022  rillig branches: 1.3.4;
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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.5 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.4 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.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 27-Feb-2022  rillig lint: concatenate string literals from left to right

Previously, the string literals "1" "2" "3" "4" were concatenated in the
order "23", "234", "1234". This influenced the location of the
diagnostics for traditional C (which doesn't know concatenation at all)
and for mixing regular strings and wide strings.

Now the diagnostics occur exactly where they are expected. The first
string literal defines whether the whole string is regular or wide, and
any further string literals must match it.

In traditional C mode, there are more diagnostics than before, but that
doesn't hurt since they are still correct and nobody uses lint in
traditional C mode anyway.
 1.3 27-Feb-2022  rillig tests/lint: demonstrate unexpected ordering of string concatenations

When lint concatenates the strings "1" "2" "3" "4", it first
concatenates "23", then "234" and finally "1234".
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 27-Feb-2022  rillig lint: concatenate string literals from left to right

Previously, the string literals "1" "2" "3" "4" were concatenated in the
order "23", "234", "1234". This influenced the location of the
diagnostics for traditional C (which doesn't know concatenation at all)
and for mixing regular strings and wide strings.

Now the diagnostics occur exactly where they are expected. The first
string literal defines whether the whole string is regular or wide, and
any further string literals must match it.

In traditional C mode, there are more diagnostics than before, but that
doesn't hurt since they are still correct and nobody uses lint in
traditional C mode anyway.
 1.3 27-Feb-2022  rillig tests/lint: demonstrate unexpected ordering of string concatenations

When lint concatenates the strings "1" "2" "3" "4", it first
concatenates "23", then "234" and finally "1234".
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.5 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.4 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.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 08-Jun-2024  rillig lint: add details to warnings about negative constant to unsigned
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Aug-2021  rillig tests/lint: test some more messages
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 27-Feb-2025  rillig lint: fix integer overflow when multiplying two large signed numbers

Seen in ipsec-tools/crypto_openssl.c.
 1.7 09-Jun-2024  rillig branches: 1.7.2;
lint: warn about lossy floating point constant to integer conversions
 1.6 08-Jun-2024  rillig tests/lint: group tests by topic
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 19-Apr-2022  rillig lint: do not warn about converting (1234567L & 0xFF) to unsigned char

Due to the '& 0xFF', there is no possible loss of accuracy.
 1.3 19-Apr-2022  rillig tests/lint: demonstrate wrong warnings for conversion from long to char
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 17-Jun-2022  rillig 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'.
 1.4 19-Apr-2022  rillig lint: do not warn about converting (1234567L & 0xFF) to unsigned char

Due to the '& 0xFF', there is no possible loss of accuracy.
 1.3 19-Apr-2022  rillig tests/lint: demonstrate wrong warnings for conversion from long to char
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Jun-2022  rillig 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.
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 01-Oct-2022  rillig lint: add hyphen to adjective 'old-style'
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 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.7 15-Apr-2023  rillig tests/lint: remove wrong comment

GCC 10 does warn about returning a temporary object, but only when
optimizations are enabled.
 1.6 15-Apr-2023  rillig tests/lint: add more tests for returning local objects
 1.5 15-Apr-2023  rillig tests/lint: extend test for returning local address
 1.4 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.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 07-Jan-2024  rillig tests/lint: test operators, integer overflow, conversions
 1.5 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 20-Feb-2025  rillig lint: add detail to message about truncated constant
 1.5 07-Jul-2023  rillig branches: 1.5.2;
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.4 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.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add tests for messages that lack quotes
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add tests for messages that lack quotes
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.9 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.8 28-Mar-2023  rillig branches: 1.8.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.6 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.5 28-Feb-2021  rillig tests/lint: keep messages in test files in sync with actual messages

Each of the tests named msg_*.c repeats the template of the message, to
make the test somewhat self-contained when viewed in isolation.

This creates a redundancy, and keeping track of this manually is next to
impossible. I tried it and failed in 9 cases, even though it has just
been 2 months since I myself created the initial files and I knew all
the time that this redundancy exists.

Be fool-proof for the future by checking this automatically.
 1.4 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.3 02-Jan-2021  rillig lint: fix message 308 "Invalid type for _Complex"

Previously, lint aborted since it didn't expect tspec_name to be called
with NOTSPEC, which at that point was the only possible value of
dcs->d_cmod.
 1.2 02-Jan-2021  rillig lint: add test for message 308 "Invalid type %s for _Complex"
 1.1 02-Jan-2021  rillig 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.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 17-Jun-2022  rillig 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'.
 1.6 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.5 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.4 03-Jan-2021  rillig lint: fix spelling of message 308

All other messages are lowercase as well.
 1.3 02-Jan-2021  rillig lint: fix message 308 "Invalid type for _Complex"

Previously, lint aborted since it didn't expect tspec_name to be called
with NOTSPEC, which at that point was the only possible value of
dcs->d_cmod.
 1.2 02-Jan-2021  rillig lint: add test for message 308 "Invalid type %s for _Complex"
 1.1 02-Jan-2021  rillig 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.
 1.9 08-Jul-2025  rillig lint: reword message about 'extra bits set to 0'

The word 'extra' in the previous wording was too unspecific to make
sense of. In the reworded message, focus on the problem instead of
mentioning only the effect.
 1.8 24-Feb-2025  rillig tests/lint: add tests for constants, pointers and lost bits
 1.7 07-Jul-2023  rillig branches: 1.7.2;
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.6 15-Oct-2022  rillig tests/lint: add more examples for 'extra bits set to 0'

Seen in sys/external/bsd/compiler_rt/dist/lib/builtins/fp_lib.h:88.
 1.5 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.4 16-May-2021  rillig lint: add quotes to message 309 about constant conversion
 1.3 16-May-2021  rillig tests/lint: add test for warning about zero-bits in '&'
 1.2 21-Feb-2021  rillig branches: 1.2.2;
lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.2.2.1 31-May-2021  cjep sync with head
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.4 16-May-2021  rillig lint: add quotes to message 309 about constant conversion
 1.3 16-May-2021  rillig tests/lint: add test for warning about zero-bits in '&'
 1.2 21-Mar-2021  rillig branches: 1.2.2;
lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.2.2.1 31-May-2021  cjep sync with head
 1.6 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.5 09-Jul-2023  rillig lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.
 1.4 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.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.4 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.3 22-Dec-2021  rillig lint: use C90 instead of C89 when referring to the C standard
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 22-Dec-2021  rillig lint: use C90 instead of C89 when referring to the C standard
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.3 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 11-Jun-2022  rillig tests/lint: add tests for messages that lack quotes
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 11-Jun-2022  rillig tests/lint: add tests for messages that lack quotes
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.3 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.6 21-Jul-2023  rillig lint: reword message about non-constant initializer
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.3 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 09-Jul-2023  rillig lint: clean up the wording of a few diagnostics
 1.4 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.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.3 27-Feb-2022  rillig lint: C99 has been released, so refer to it by its proper name
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 27-Feb-2022  rillig tests/lint: add tests for messages referring to C99
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.4 14-Sep-2023  rillig lint: fix wording of diagnostics about 'C99 extension'

The term 'extension' means an extension to a C standard. C99 by itself
is not an extension but a revision of the C standard.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 10-Oct-2021  rillig tests/lint: add more examples for continue in do-while-0
 1.3 09-Oct-2021  rillig tests/lint: add examples for bogus warning 160 and for error 323
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 10-Oct-2021  rillig tests/lint: add more examples for continue in do-while-0
 1.3 09-Oct-2021  rillig tests/lint: add examples for bogus warning 160 and for error 323
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.10 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.9 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.8 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.7 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.6 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.5 31-Jan-2021  rillig lint: add expections to tests

msg_098: fix suffix for floating point constant
msg_127: remove prototype
msg_146: fix return type
 1.4 06-Jan-2021  rillig lint: fix test for message 324 on i386

i386 is an ILP32 platform (arch/i386/targparam.h). On these platforms,
int and long have the same size, and even with the -p option for
portability checks, INT_RSIZE in inittyp.c is defined to 4, not 3.

Because of this, in check_integer_conversion, psize(nt) was not greater
than psize(ot), and the warning was not issued.

To make the test behave the same on all platforms, changed the long
variables to long long, since long long is 64-bit on all platforms, and
int is 32-bit.
 1.3 05-Jan-2021  rillig lint: remove redundant symbolic operator names

These symbolic names for INCBEF, INCAFT, DECBEF and DECAFT were
non-standard and thus confusing. All other operators were as expected.
Now that the operator names from ops.def are very similar, there is no
need to keep to almost identical lists around.

No change to the user-visible messages since the only place where these
operator names were used was in 324, and that message was restricted to
PLUS, MINUS, MULT and SHL.
 1.2 05-Jan-2021  rillig lint: add test for "suggest cast" [324]

This warning is the only one that calls print_tnode, which in turn uses
the redundant operator names in str_op_t.

There is another list of operator names in ops.c, but those names
include more clutter, for example "p + p" instead of a simple "+".
Using those operator names would therefore rather be confusing. These
two lists should be merged, to remove unnecessary redundancy.
 1.1 02-Jan-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 06-Jan-2021  rillig lint: fix test for message 324 on i386

i386 is an ILP32 platform (arch/i386/targparam.h). On these platforms,
int and long have the same size, and even with the -p option for
portability checks, INT_RSIZE in inittyp.c is defined to 4, not 3.

Because of this, in check_integer_conversion, psize(nt) was not greater
than psize(ot), and the warning was not issued.

To make the test behave the same on all platforms, changed the long
variables to long long, since long long is 64-bit on all platforms, and
int is 32-bit.
 1.2 05-Jan-2021  rillig lint: add test for "suggest cast" [324]

This warning is the only one that calls print_tnode, which in turn uses
the redundant operator names in str_op_t.

There is another list of operator names in ops.c, but those names
include more clutter, for example "p + p" instead of a simple "+".
Using those operator names would therefore rather be confusing. These
two lists should be merged, to remove unnecessary redundancy.
 1.1 02-Jan-2021  rillig 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.
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.8 07-Jul-2023  rillig lint: only skip 'unused' warnings after errors, not other warnings

Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.5 20-Mar-2021  rillig lint: fix check for declaration after statement in pre-C99 mode

The new code may not be the most beautiful, but it fixes all bugs that
occurred while testing message 327. The grammar rules are taken from
C99 6.8.2, so it's no surprise they work well.
 1.4 20-Mar-2021  rillig lint: properly name C99 in message about declaration after statement

Now that C99 has been released and published, there is no reason anymore
to refer to it as C9X.
 1.3 20-Mar-2021  rillig tests/lint: add test for declaration after statement
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.4 20-Mar-2021  rillig lint: fix check for declaration after statement in pre-C99 mode

The new code may not be the most beautiful, but it fixes all bugs that
occurred while testing message 327. The grammar rules are taken from
C99 6.8.2, so it's no surprise they work well.
 1.3 20-Mar-2021  rillig lint: properly name C99 in message about declaration after statement

Now that C99 has been released and published, there is no reason anymore
to refer to it as C9X.
 1.2 20-Mar-2021  rillig tests/lint: add test for declaration after statement
 1.1 02-Jan-2021  rillig 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.
 1.4 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.3 03-Aug-2021  rillig lint: union casts are only available as a GCC extension, not in C99
 1.2 21-Feb-2021  rillig lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.
 1.1 02-Jan-2021  rillig 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.
 1.4 17-Jun-2022  rillig 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'.
 1.3 03-Aug-2021  rillig lint: union casts are only available as a GCC extension, not in C99
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 02-Jan-2021  rillig 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.
 1.5 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.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 03-Aug-2021  rillig lint: union casts are only available as a GCC extension, not in C99
 1.2 24-Jan-2021  rillig lint: add test for message 329, union cast with incompatible type
 1.1 02-Jan-2021  rillig 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.
 1.6 17-Jun-2022  rillig 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'.
 1.5 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.4 03-Aug-2021  rillig lint: union casts are only available as a GCC extension, not in C99
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 24-Jan-2021  rillig lint: add test for message 329, union cast with incompatible type
 1.1 02-Jan-2021  rillig 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.
 1.8 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.7 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.6 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.5 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.4 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.3 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.2 16-Jan-2021  rillig lint: normalize whitespace in tests
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.5 17-Jun-2022  rillig 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'.
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.7 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.6 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.5 17-Jun-2022  rillig 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'.
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.7 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.6 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.5 17-Jun-2022  rillig 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'.
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.8 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.7 07-Jul-2023  rillig branches: 1.7.2;
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.6 11-May-2023  rillig lint: fix type name in diagnostic for enum as controlling expression

Previously, the type was reported as 'int' instead of 'enum'.

Continue to only report the type simple for pointer types, as the exact
pointer type is irrelevant to this message.
 1.5 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.4 04-Jul-2021  rillig lint: in strict bool mode, continue after error message

If a controlling expression is not of type bool but of any other scalar
type, keep the expression. Its value is still useful for control flow
analysis.

This prevents an assertion failure when running lint on the generated
scan.c, which contains a "while (1)" that does not stem from a system
header. If it did, lint would accept it, see tn_from_system_header. But
"scan.c" is not considered a system header. Maybe lint's definition of
a system header needs to be revisited.

After fixing this, there is another assertion failure though, so scan.c
is not yet ready to be inspected by lint.
 1.3 21-Mar-2021  rillig lint: fix reachability computation in if statements

Previously, only loop statements were considered for reachability. This
ignored the possibility of an early return in an if statement, or
unreachable branches.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 04-Jul-2021  rillig lint: in strict bool mode, continue after error message

If a controlling expression is not of type bool but of any other scalar
type, keep the expression. Its value is still useful for control flow
analysis.

This prevents an assertion failure when running lint on the generated
scan.c, which contains a "while (1)" that does not stem from a system
header. If it did, lint would accept it, see tn_from_system_header. But
"scan.c" is not considered a system header. Maybe lint's definition of
a system header needs to be revisited.

After fixing this, there is another assertion failure though, so scan.c
is not yet ready to be inspected by lint.
 1.4 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.3 21-Mar-2021  rillig lint: fix reachability computation in if statements

Previously, only loop statements were considered for reachability. This
ignored the possibility of an early return in an if statement, or
unreachable branches.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.5 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.4 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.3 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.2 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.4 17-Jun-2022  rillig 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'.
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.7 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.6 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.5 17-Jun-2022  rillig 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'.
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.7 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.6 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.5 17-Jun-2022  rillig 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'.
 1.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.2 16-Jan-2021  rillig lint: in strict bool mode, integer constants do not have type bool

Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.

To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
 1.1 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.10 27-Feb-2025  rillig lint: allow the getopt warning to be suppressed in the natural place
 1.9 28-Mar-2023  rillig branches: 1.9.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.8 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.7 09-Oct-2021  rillig lint: warn if a getopt switch tries to handle unreachable ':'
 1.6 09-Oct-2021  rillig tests/lint: test getopt with an options string starting with ':'
 1.5 22-Aug-2021  rillig lint: fix wrong warning about '?' in getopt
 1.4 22-Aug-2021  rillig tests/lint: demonstrate wrong warning for '?' in getopt
 1.3 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.2 20-Feb-2021  rillig lint: reproduce the crash from ckgetopt.c 1.2

The intention of the getopt check was to analyze only those while loops
whose condition consists of the usual getopt call. For all other while
loops, ck.while_level was intended to stay at 0.

This was not the case in ckgetopt.c 1.2 and has been fixed in ckgetopt.c
1.3. The code did not document the intended invariants though, which it
should have done. This will be done in a follow-up commit.
 1.1 19-Feb-2021  rillig lint: warn about mismatch in getopt handling
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 17-Jun-2022  rillig 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'.
 1.6 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.5 09-Oct-2021  rillig lint: warn if a getopt switch tries to handle unreachable ':'
 1.4 09-Oct-2021  rillig tests/lint: test getopt with an options string starting with ':'
 1.3 22-Aug-2021  rillig lint: fix wrong warning about '?' in getopt
 1.2 22-Aug-2021  rillig tests/lint: demonstrate wrong warning for '?' in getopt
 1.1 19-Feb-2021  rillig lint: warn about mismatch in getopt handling
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.2 05-Apr-2021  rillig tests/lint: one comment per expected diagnostic

This makes it possible to check for diagnostics that contain commas.
 1.1 19-Feb-2021  rillig lint: warn about mismatch in getopt handling
 1.3 17-Jun-2022  rillig 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'.
 1.2 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.1 19-Feb-2021  rillig lint: warn about mismatch in getopt handling
 1.5 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.4 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.3 16-Apr-2022  rillig lint: model C language levels in a future-compatible way

The options -t, -s and -S are confusing because they are used
inconsistently. The option -S enables C99 features, but when using it
instead of -s, it also doesn't enable all checks required by C90 and
later. Prepare fixing of these inconsistencies by replacing the flag
variables with language levels that can be extended in a
straight-forward way as new C standards arrive.

| option | allow_trad | allow_c90 | allow_c99 | allow_c11 |
|--------|------------|-----------|-----------|-----------|
| -t | x | - | - | - |
| (none) | x | x | - | - |
| -s | - | x | - | - |
| -S | - | x | x | - |
| -Ac11 | - | x | x | x |

Each usage of the old flag variables will be inspected and migrated
individually, to clean up the subtle variations in the conditions and to
provide a simpler model.

When lint was created in 1995, its focus was migrating traditional C
code to C90 code. Lint does not help in migrating from C90 to C99 or
from C99 to C11 since there are only few silent changes, and simply
because nobody took the time to implement these migration aids. If
necessary, such migration modes could be added separately.

There is a small functional change: when the option -s is combined with
either -S or -Ac11, lint now only keeps the last of these options.
Previously, these options could be combined, leading to a mixture of
language levels, halfway between C90, C99 and C11. Especially combining
traditional C with C11 doesn't make sense, but xlint currently allows
it.

The 3 tests that accidentally specified multiple language levels have
been adjusted to a single language level.
 1.2 05-Jul-2021  rillig lint: rename message 340 to talk about "GCC extension", not "GNU"
 1.1 07-Mar-2021  rillig lint: in strict C mode, warn about initialization with '[a ... b]'

https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html
 1.6 17-Jun-2022  rillig 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'.
 1.5 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.4 16-Apr-2022  rillig lint: model C language levels in a future-compatible way

The options -t, -s and -S are confusing because they are used
inconsistently. The option -S enables C99 features, but when using it
instead of -s, it also doesn't enable all checks required by C90 and
later. Prepare fixing of these inconsistencies by replacing the flag
variables with language levels that can be extended in a
straight-forward way as new C standards arrive.

| option | allow_trad | allow_c90 | allow_c99 | allow_c11 |
|--------|------------|-----------|-----------|-----------|
| -t | x | - | - | - |
| (none) | x | x | - | - |
| -s | - | x | - | - |
| -S | - | x | x | - |
| -Ac11 | - | x | x | x |

Each usage of the old flag variables will be inspected and migrated
individually, to clean up the subtle variations in the conditions and to
provide a simpler model.

When lint was created in 1995, its focus was migrating traditional C
code to C90 code. Lint does not help in migrating from C90 to C99 or
from C99 to C11 since there are only few silent changes, and simply
because nobody took the time to implement these migration aids. If
necessary, such migration modes could be added separately.

There is a small functional change: when the option -s is combined with
either -S or -Ac11, lint now only keeps the last of these options.
Previously, these options could be combined, leading to a mixture of
language levels, halfway between C90, C99 and C11. Especially combining
traditional C with C11 doesn't make sense, but xlint currently allows
it.

The 3 tests that accidentally specified multiple language levels have
been adjusted to a single language level.
 1.3 05-Jul-2021  rillig lint: rename message 340 to talk about "GCC extension", not "GNU"
 1.2 21-Mar-2021  rillig lint: prefix error messages with 'error:'

This makes it easier to find these errors in the build logs.
 1.1 07-Mar-2021  rillig lint: in strict C mode, warn about initialization with '[a ... b]'

https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html
 1.5 28-Jan-2025  rillig tests/lint: fix platform-specific tests for <ctype.h> usage

On arm (32-bit, ptrdiff_t is long), there was an extra warning that
didn't show up on i386 or x86_64.

After moving the test to the platform-specific tests, the i386 test shows
an additional warning about integer overflow. This is because the
platform-specific tests run with more lint warnings enabled than in
msg_341.c.
 1.4 18-Dec-2024  rillig lint: warn about unusual argument types in <ctype.h> functions
 1.3 28-Mar-2023  rillig branches: 1.3.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 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.1 05-Apr-2021  rillig 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
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 17-Jun-2022  rillig 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'.
 1.1 05-Apr-2021  rillig 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
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 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.3 25-Jul-2021  rillig lint: split is_ctype_function into separate parts

This reduces the number of string comparisons for function names that
start with 'is' or 'to'.

The tests now cover function names that start with 'is' or 'to' but are
not one of the well-known functions from ctype.h. This removes the '*'
in the output from gcov.

No functional change.
 1.2 25-Jul-2021  rillig tests/lint: cover code in ckctype.c
 1.1 05-Apr-2021  rillig 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
 1.5 17-Jun-2022  rillig 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'.
 1.4 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.3 25-Jul-2021  rillig lint: split is_ctype_function into separate parts

This reduces the number of string comparisons for function names that
start with 'is' or 'to'.

The tests now cover function names that start with 'is' or 'to' but are
not one of the well-known functions from ctype.h. This removes the '*'
in the output from gcov.

No functional change.
 1.2 25-Jul-2021  rillig tests/lint: cover code in ckctype.c
 1.1 05-Apr-2021  rillig 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
 1.11 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.10 14-Sep-2023  rillig lint: fix wording of diagnostics about 'C99 extension'

The term 'extension' means an extension to a C standard. C99 by itself
is not an extension but a revision of the C standard.
 1.9 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.8 21-Jun-2022  rillig lint: add quotes and details to some more messages
 1.7 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.6 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.5 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.4 14-Apr-2021  rillig tests/lint: adjust test for C11 to the change in grammar and options
 1.3 14-Apr-2021  rillig lint: add option to accept C11 features

The list of available letters for the command line options gets shorter
and shorter. Most of the interesting letters are already used for some
warning categories. Curiously, -A, -W and -E were all still available.

The option -A nicely matches the intention of the option, which is to
allow a certain set of language features. To keep the option available
for further extensions, define -Ac11 as the currently only valid option
of that kind. This allows straight-forward extension for C17 and future
language standards, as well as independent feature-sets. The options -W
and -E may someday complement the -A option, using the allow/warn/error
categories.
 1.2 14-Apr-2021  rillig lint: add support for C11-isms such as int[static 3]
 1.1 14-Apr-2021  rillig lint: add test for newly added message about static array size
 1.7 17-Jun-2022  rillig 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'.
 1.6 17-Jun-2022  rillig tests/lint: add more details to tests from msg_300 until msg_343
 1.5 03-Aug-2021  rillig lint: add quotes around placeholder in message 214

function '%s' expects to return value
 1.4 15-Jul-2021  rillig tests/lint: cover more edge cases in the parser
 1.3 14-Apr-2021  rillig tests/lint: adjust test for C11 to the change in grammar and options
 1.2 14-Apr-2021  rillig lint: add support for C11-isms such as int[static 3]
 1.1 14-Apr-2021  rillig lint: add test for newly added message about static array size
 1.2 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.1 16-May-2021  rillig branches: 1.1.2;
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]
 1.1.2.2 31-May-2021  cjep sync with head
 1.1.2.1 16-May-2021  cjep file msg_344.c was added on branch cjep_staticlib_x on 2021-05-31 22:15:24 +0000
 1.2 17-Jun-2022  rillig 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'.
 1.1 16-May-2021  rillig branches: 1.1.2;
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]
 1.1.2.2 31-May-2021  cjep sync with head
 1.1.2.1 16-May-2021  cjep file msg_344.exp was added on branch cjep_staticlib_x on 2021-05-31 22:15:24 +0000
 1.4 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.3 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.2 27-Jun-2021  rillig lint: fix result type of _Generic expressions
 1.1 27-Jun-2021  rillig 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".
 1.2 17-Jun-2022  rillig 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'.
 1.1 27-Jun-2021  rillig 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".
 1.10 31-Aug-2024  rillig lint: KNF
 1.9 02-Aug-2023  rillig branches: 1.9.2;
lint: fix plural form in message 150
 1.8 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.7 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.6 09-Oct-2021  rillig lint: warn that bsearch effectively discards 'const'

Just like strchr, bsearch takes a const pointer and returns a non-const
pointer into the same object.
 1.5 09-Oct-2021  rillig tests/lint: test effective unconst cast using bsearch

Seen in usr.bin/indent/lexi.c, function lexi.
 1.4 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.3 15-Aug-2021  rillig lint: extend check for unconst functions

The functions memchr, strpbrk, strrchr and strstr effectively remove the
const qualifier of their first argument, just like strchr.
 1.2 15-Aug-2021  rillig tests/lint: add tests for more unconst functions
 1.1 09-Aug-2021  rillig 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'.
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 09-Oct-2021  rillig lint: warn that bsearch effectively discards 'const'

Just like strchr, bsearch takes a const pointer and returns a non-const
pointer into the same object.
 1.4 16-Aug-2021  rillig tests/lint: add tests for several messages about type mismatch
 1.3 15-Aug-2021  rillig lint: extend check for unconst functions

The functions memchr, strpbrk, strrchr and strstr effectively remove the
const qualifier of their first argument, just like strchr.
 1.2 15-Aug-2021  rillig tests/lint: add tests for more unconst functions
 1.1 09-Aug-2021  rillig 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'.
 1.7 02-Aug-2023  rillig lint: fix handling of unnamed function parameters
 1.6 02-Aug-2023  rillig lint: distinguish between arguments and parameters
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 13-Sep-2021  rillig lint: continue analysis of wrong type in abstract declaration

No functional change.
 1.2 12-Sep-2021  rillig lint: track down wrong function type in abstract type
 1.1 12-Sep-2021  rillig 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.
 1.5 17-Jun-2022  rillig 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'.
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 13-Sep-2021  rillig lint: continue analysis of wrong type in abstract declaration

No functional change.
 1.2 12-Sep-2021  rillig lint: track down wrong function type in abstract type
 1.1 12-Sep-2021  rillig 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.
 1.14 11-Jul-2025  rillig lint: fix warning about enum array index

Seen in openssh/fmt_scaled.c, scale_chars.
 1.13 11-Jul-2025  rillig tests/lint: demonstrate wrong warning for enum array index

Seen in openssh/fmt_scaled.c, scale_chars.
 1.12 31-Oct-2024  rillig lint: allow enum constant named 'N_*' to exceed the array index

Seen in libxcb.

While here, add the name of the enum constant to the message, to quickly
decide whether the identifier is outside the range of expected enum
values, thus marking the number of enum constants.
 1.11 29-Oct-2024  rillig lint: add details to message about too large integer constant
 1.10 01-Mar-2024  rillig branches: 1.10.2;
tests/lint: remove redundant documentation
 1.9 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.8 14-Jan-2023  rillig tests/lint: add more tests for array/enum mismatch
 1.7 08-Jan-2023  rillig lint: recognize enum constant named 'max' as a count of values

Seen in external/bsd/mdocml/dist/mdoc.h(50).
 1.6 08-Jan-2023  rillig tests/lint: add more tests for enum/array mismatch
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 01-Nov-2021  rillig lint: do not warn about array size mismatch in array[(int)enum]

The cast to 'int' explicitly converts the type away from being an enum.
 1.3 01-Nov-2021  rillig lint: in the check for array[enum], allow enum constant NUM

When an enum type defines a constant NUM_VALUES, this constant is
usually not part of the enum values available to the application but
rather a handy place for defining the number of other enum values. Don't
warn about this case.

Seen in openpam_impl.h and several other places.
 1.2 31-Oct-2021  rillig lint: fix invalid memory access in array[enum] check

Lint checks whether in an expression 'array[enum]', the array size
matches the value of the maximum enum constant.

The previous tests for this check were missing the case where an enum
name was explicitly cast to an integer type and then used as an array
index. In this situation, the resulting type of the array index is a
plain 'int' without any information about its previous 'enum' history.

An entirely different case is when the 'enum' is implicitly converted to
an integer type, as in the test color_name_too_many. There, for the
final type of the array index, rn->tn_type->t_is_enum is true, which
means that rn->tn_type->t_enum is properly filled.

The bug was a simple typo, I had forgotten a tn_left indirection, which
is necessary to get the type before the implicit conversion.

Found and reported by Christos, triggered by src/lib/libperfuse/ops.c
1.89 line 1226 expression 'VTTOIF(vap->va_type)'.
 1.1 30-Oct-2021  rillig 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.
 1.10.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 17-Jun-2022  rillig 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'.
 1.5 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.4 01-Nov-2021  rillig lint: do not warn about array size mismatch in array[(int)enum]

The cast to 'int' explicitly converts the type away from being an enum.
 1.3 01-Nov-2021  rillig lint: in the check for array[enum], allow enum constant NUM

When an enum type defines a constant NUM_VALUES, this constant is
usually not part of the enum values available to the application but
rather a handy place for defining the number of other enum values. Don't
warn about this case.

Seen in openpam_impl.h and several other places.
 1.2 31-Oct-2021  rillig lint: fix invalid memory access in array[enum] check

Lint checks whether in an expression 'array[enum]', the array size
matches the value of the maximum enum constant.

The previous tests for this check were missing the case where an enum
name was explicitly cast to an integer type and then used as an array
index. In this situation, the resulting type of the array index is a
plain 'int' without any information about its previous 'enum' history.

An entirely different case is when the 'enum' is implicitly converted to
an integer type, as in the test color_name_too_many. There, for the
final type of the array index, rn->tn_type->t_is_enum is true, which
means that rn->tn_type->t_enum is properly filled.

The bug was a simple typo, I had forgotten a tn_left indirection, which
is necessary to get the type before the implicit conversion.

Found and reported by Christos, triggered by src/lib/libperfuse/ops.c
1.89 line 1226 expression 'VTTOIF(vap->va_type)'.
 1.1 30-Oct-2021  rillig 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.
 1.3 01-Mar-2024  rillig tests/lint: remove redundant documentation
 1.2 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.1 12-May-2022  rillig tests/lint: add more tests for __alignof__
 1.2 17-Jun-2022  rillig 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'.
 1.1 12-May-2022  rillig tests/lint: add more tests for __alignof__
 1.4 01-Mar-2024  rillig tests/lint: remove redundant documentation
 1.3 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.2 07-Jul-2023  rillig tests/lint: merge duplicate tests for C11 _Atomic
 1.1 21-Jan-2023  rillig 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.
 1.8 01-Mar-2024  rillig tests/lint: remove redundant documentation
 1.7 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.6 07-Jul-2023  rillig tests/lint: test all combinations of {func,obj}_{decl,def}

For a non-static function definition that is not declared in a header,
lint doesn't currently warn. The previous test didn't notice this.
 1.5 28-Jun-2023  rillig tests/lint: fix preprocessor line number validation

When running the tests via ATF, the filename was an absolute filename,
while the preprocessing line in the test file uses a relative filename.
These two didn't match.
 1.4 25-Apr-2023  rillig lint: reword message for missing declaration in header

Suggested by Christos.
 1.3 22-Apr-2023  rillig lint: fix wrong warning about 'extern' temporary identifier
 1.2 22-Apr-2023  rillig tests/lint: demonstrate wrong warning about extern temporary identifier
 1.1 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 01-Mar-2024  rillig tests/lint: remove redundant documentation
 1.2 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.1 28-Mar-2023  rillig lint: warn about 'extern' declarations inside function bodies

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html

The previous attempt (message 351 about 'extern' declarations outside
headers) did not cover the proposal from the tech-userlevel mailing list
but instead warns about a different usage pattern of the 'extern'
keyword.
 1.5 01-Mar-2024  rillig tests/lint: remove redundant documentation
 1.4 14-Jul-2023  rillig lint: clean up comments, add a test for the '?:' operator
 1.3 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.2 03-Jul-2023  rillig lint: fix C11 mode to not allow C23 features (since yesterday)
 1.1 02-Jul-2023  rillig tests/lint: add C23 tests
 1.2 01-Mar-2024  rillig tests/lint: remove redundant documentation
 1.1 03-Aug-2023  rillig lint: make '_Static_assert' only available in C11 or C23 mode
 1.2 01-Mar-2024  rillig tests/lint: remove redundant documentation
 1.1 03-Aug-2023  rillig lint: make '_Static_assert' only available in C11 or C23 mode
 1.3 25-Mar-2024  rillig lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.2 01-Mar-2024  rillig tests/lint: remove redundant documentation
 1.1 03-Feb-2024  rillig lint: warn about short octal escape followed by '8' or '9'

These mistakes is typically found in snprintb format directives but is
probably a typo everywhere else as well.
 1.3 05-Nov-2024  rillig tests/lint: extend snprintb tests and improve their documentation
 1.2 31-Aug-2024  rillig lint: KNF
 1.1 01-Mar-2024  rillig branches: 1.1.2;
lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.1.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 05-Nov-2024  rillig tests/lint: extend snprintb tests and improve their documentation
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 03-Mar-2024  rillig branches: 1.2.2;
lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 05-Nov-2024  rillig tests/lint: extend snprintb tests and improve their documentation
 1.2 31-Aug-2024  rillig lint: KNF
 1.1 01-Mar-2024  rillig branches: 1.1.2;
lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.1.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 05-Nov-2024  rillig tests/lint: extend snprintb tests and improve their documentation
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 03-Mar-2024  rillig branches: 1.2.2;
lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 05-Nov-2024  rillig tests/lint: extend snprintb tests and improve their documentation
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 03-Mar-2024  rillig branches: 1.2.2;
lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Aug-2024  rillig lint: KNF
 1.3 25-Mar-2024  rillig branches: 1.3.2;
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.2 03-Mar-2024  rillig lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.7 05-Nov-2024  rillig tests/lint: extend snprintb tests and improve their documentation
 1.6 31-Aug-2024  rillig lint: KNF
 1.5 12-Apr-2024  rillig branches: 1.5.2;
lint: in snprintb, warn about all escaped characters in descriptions
 1.4 03-Mar-2024  rillig lint: clean up string parsing and snprintb check
 1.3 03-Mar-2024  rillig lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).
 1.2 03-Mar-2024  rillig lint: fix warning about "empty" single-letter snprintb descriptions
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Aug-2024  rillig lint: KNF
 1.3 25-Mar-2024  rillig branches: 1.3.2;
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.2 03-Mar-2024  rillig lint: fix warning about "empty" single-letter snprintb descriptions
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Aug-2024  rillig lint: KNF
 1.3 25-Mar-2024  rillig branches: 1.3.2;
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.2 03-Mar-2024  rillig lint: fix warning about "empty" single-letter snprintb descriptions
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 31-Aug-2024  rillig lint: KNF
 1.4 25-Mar-2024  rillig branches: 1.4.2;
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.3 03-Mar-2024  rillig lint: fix warning about "empty" single-letter snprintb descriptions
 1.2 03-Mar-2024  rillig lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Aug-2025  rillig lint: check for mismatches in snprintb conversions

Seen in sh3/dmacreg.h, SH3_DMAC_CHCR_BITS.
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 03-Mar-2024  rillig branches: 1.2.2;
lint: fix warning about "empty" single-letter snprintb descriptions
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 25-Mar-2024  rillig branches: 1.2.2;
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 02-Mar-2024  rillig branches: 1.2.2;
lint: check snprintb formats for overlapping bits and fields
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 02-Mar-2024  rillig branches: 1.2.2;
lint: check snprintb formats for overlapping bits and fields
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 12-Apr-2024  rillig branches: 1.2.2;
lint: in snprintb, warn about all escaped characters in descriptions
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Aug-2024  rillig lint: KNF
 1.3 03-Mar-2024  rillig branches: 1.3.2;
lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).
 1.2 02-Mar-2024  rillig lint: check snprintb formats for overlapping bits and fields
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Aug-2024  rillig lint: KNF
 1.3 03-Mar-2024  rillig branches: 1.3.2;
lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).
 1.2 02-Mar-2024  rillig lint: check snprintb formats for overlapping bits and fields
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 31-Aug-2024  rillig lint: KNF
 1.5 25-Mar-2024  rillig branches: 1.5.2;
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.4 03-Mar-2024  rillig lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).
 1.3 03-Mar-2024  rillig lint: fix warning about "empty" single-letter snprintb descriptions
 1.2 03-Mar-2024  rillig lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Aug-2024  rillig lint: KNF
 1.3 03-Mar-2024  rillig branches: 1.3.2;
lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.2 02-Mar-2024  rillig lint: check snprintb formats for overlapping bits and fields
 1.1 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Aug-2024  rillig lint: KNF
 1.3 12-Apr-2024  rillig branches: 1.3.2;
lint: in snprintb, warn about all escaped characters in descriptions
 1.2 03-Mar-2024  rillig lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.1 02-Mar-2024  rillig lint: check snprintb formats for overlapping bits and fields
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 31-Aug-2024  rillig lint: KNF
 1.4 25-Mar-2024  rillig branches: 1.4.2;
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.3 03-Mar-2024  rillig lint: warn about escaped snprintb directive

Repurpose message 362, as the previous version was redundant since null
bytes in old-style formats are already covered by message 371 (bit
position out of range) and 377 (redundant '\0' at the end).
 1.2 03-Mar-2024  rillig lint: fix warning about "empty" single-letter snprintb descriptions
 1.1 03-Mar-2024  rillig lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 31-Aug-2024  rillig lint: KNF
 1.2 25-Mar-2024  rillig branches: 1.2.2;
lint: rename snprintb 'directives' to 'conversions'

This aligns the terminology with the snprintf function.
 1.1 03-Mar-2024  rillig lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 13-Nov-2024  rillig lint: add more details to 'statement not reached' message

In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
 1.1 11-May-2024  rillig branches: 1.1.2;
lint: warn when comparing an integer to a floating point constant
 1.1.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 22-Jun-2024  rillig tests/lint: skip tests for converting large floating point to integer

These tests differ between the platforms supported by lint. The
differences may be caused by hardware differences, the default rounding
mode, bugs in the emulator running the tests, bugs in the
platform-specific string-to-float or float-to-string conversions and
probably some more.

For now, accept that lint will behave differently on those platforms.
 1.1 09-Jun-2024  rillig lint: warn about lossy floating point constant to integer conversions
 1.2 22-Jun-2024  rillig tests/lint: skip tests for converting large floating point to integer

These tests differ between the platforms supported by lint. The
differences may be caused by hardware differences, the default rounding
mode, bugs in the emulator running the tests, bugs in the
platform-specific string-to-float or float-to-string conversions and
probably some more.

For now, accept that lint will behave differently on those platforms.
 1.1 09-Jun-2024  rillig lint: warn about lossy floating point constant to integer conversions
 1.2 12-Apr-2025  rillig branches: 1.2.4;
lint: warn about constant assignment in operand to '&&' or '||'

Seen in bin/sh/redir.c:1084 for errno, which is fine.

Seen in usr.sbin/mopd/mopprobe/mopprobe.c:235, which looks suspicious
but hasn't been touched since 1997.
 1.1 10-Jul-2024  rillig lint: add warning for '!(var = constant)'

This catches expressions like 'ATF_CHECK(errno = ENOENT)', which was
intended to use '==' instead of '='.
 1.2.4.2 02-Aug-2025  perseant Sync with HEAD
 1.2.4.1 12-Apr-2025  perseant file msg_382.c was added on branch perseant-exfatfs on 2025-08-02 05:58:19 +0000
 1.4 04-May-2025  rillig branches: 1.4.4;
lint: in a parameter declaration using typedef, keep the qualifiers

While C23 6.7.7.4p6 doesn't explicitly mention this particular case of a
'const typedef', keeping the qualifiers fixes a warning in probably
legitimate code.

Seen in cvs, regex_internal.c, function 'bitset_contain'.
 1.3 04-May-2025  rillig tests/lint: demonstrate wrong interpretation of const pointer parameter

Seen in external/gpl2/xcvs/dist/lib/regex_internal.c:697.
 1.2 04-May-2025  rillig lint: add more details to message about discarding qualifiers

The name of the function (or, if not available, its type) is useful in
lines that contain more than one function call.
 1.1 23-Nov-2024  rillig lint: use separate message when discarding a qualifier in call
 1.4.4.2 02-Aug-2025  perseant Sync with HEAD
 1.4.4.1 04-May-2025  perseant file msg_383.c was added on branch perseant-exfatfs on 2025-08-02 05:58:19 +0000
 1.2 03-Jan-2025  rillig branches: 1.2.4;
lint: add detail to message about obsolete identifier list
 1.1 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.2.4.2 02-Aug-2025  perseant Sync with HEAD
 1.2.4.1 03-Jan-2025  perseant file msg_384.c was added on branch perseant-exfatfs on 2025-08-02 05:58:19 +0000
 1.2 10-Mar-2025  rillig branches: 1.2.4;
lint: only warn about do-while macro if the 'do' is a keyword
 1.1 08-Dec-2024  rillig lint: warn about do-while macros that end with a semicolon
 1.2.4.2 02-Aug-2025  perseant Sync with HEAD
 1.2.4.1 10-Mar-2025  perseant file msg_385.c was added on branch perseant-exfatfs on 2025-08-02 05:58:19 +0000
 1.1 31-Aug-2025  rillig lint: check for mismatches in snprintb conversions

Seen in sh3/dmacreg.h, SH3_DMAC_CHCR_BITS.
 1.8 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.7 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.6 04-Jan-2023  rillig tests/lint: merge tests for ':?' with null pointer constant
 1.5 04-Jan-2023  rillig lint: fix the result type of '?:' for void pointers

The change from 2015-07-29 was wrong since that rule only applies to
null pointer constants but not to other void pointers.
 1.4 03-Jan-2023  rillig tests/lint: demonstrate wrong type for '?:' expressions
 1.3 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.2 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.1 02-Apr-2021  rillig tests/lint: prevent typo from tree.c 1.264 from happening again
 1.3 17-Jun-2022  rillig 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'.
 1.2 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.1 02-Apr-2021  rillig tests/lint: prevent typo from tree.c 1.264 from happening again
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 19-Aug-2022  rillig lint: add more details to message about large bit-shifts
 1.3 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.2 31-Jul-2021  rillig lint: improve support for __int128_t and __uint128_t

For the .ln files, I chose the letter 'J' to represent the 128-bit
integer types since it is close to 'I' for int. The naming of 'L' for
'long' is obvious, but 'Q' for 64-bit integers is a quad-16-bit word,
which is an unusual measurement unit nowadays. One benefit of choosing
'J' is that the next letter, 'K' can then be used for 256-bit integer
types.

Support for 128-bit integer types is still very basic. Plus, it is only
supported on LP64 platforms, which means that lint cannot be
cross-compiled to check for an LP64 platform while running on an ILP32
platform.
 1.1 04-Jul-2021  rillig test/lint: demonstrate wrong warnings for 128-bit shifts
 1.3 17-Jun-2022  rillig 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'.
 1.2 31-Jul-2021  rillig lint: improve support for __int128_t and __uint128_t

For the .ln files, I chose the letter 'J' to represent the 128-bit
integer types since it is close to 'I' for int. The naming of 'L' for
'long' is obvious, but 'Q' for 64-bit integers is a quad-16-bit word,
which is an unusual measurement unit nowadays. One benefit of choosing
'J' is that the next letter, 'K' can then be used for 256-bit integer
types.

Support for 128-bit integer types is still very basic. Plus, it is only
supported on LP64 platforms, which means that lint cannot be
cross-compiled to check for an LP64 platform while running on an ILP32
platform.
 1.1 04-Jul-2021  rillig test/lint: demonstrate wrong warnings for 128-bit shifts
 1.4 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.3 25-Jul-2021  rillig tests/lint: cover every code line in the grammar
 1.2 25-Jul-2021  rillig lint: fix parsing of GNU __attribute__ after __asm

GCC only accepts them in the order __asm __attribute__, not the other
way round. So should lint.
 1.1 25-Jul-2021  rillig tests/lint: test declarators with attributes
 1.3 17-Jun-2022  rillig 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'.
 1.2 25-Jul-2021  rillig lint: fix parsing of GNU __attribute__ after __asm

GCC only accepts them in the order __asm __attribute__, not the other
way round. So should lint.
 1.1 25-Jul-2021  rillig tests/lint: test declarators with attributes
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 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.1 25-Jul-2021  rillig 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.
 1.2 17-Jun-2022  rillig 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'.
 1.1 25-Jul-2021  rillig 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.
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 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.1 25-Jul-2021  rillig 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.
 1.2 17-Jun-2022  rillig 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'.
 1.1 25-Jul-2021  rillig 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.
 1.12 26-Aug-2023  rillig lint: make diagnostics about ANSI C more international
 1.11 02-Aug-2023  rillig lint: fix handling of unnamed function parameters
 1.10 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9 17-Jun-2022  rillig tests/lint: make 'expect+-' comments stricter

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

The test msg_342 now reports its messages properly as being in the file
msg_342.c, rather than msg_341.c. This had been a copy-and-paste
mistake.
 1.8 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.7 25-Jul-2021  rillig tests/lint: cover every code line in the grammar
 1.6 25-Jul-2021  rillig tests/lint: explain where the second __attribute__ comes from
 1.5 25-Jul-2021  rillig tests/lint: fix unintended line breaks
 1.4 25-Jul-2021  rillig lint: fix parsing of 'typeof(double(typeof(0.0)))'

By removing the misplaced grammar rule 'abstract_declarator: T_TYPEOF',
the type expression 'typeof(double(typeof(0.0)))' is no longer
interpreted as a declarator, but rather as a type specifier, just as in
the GCC parser.

This resolves 7 shift/reduce conflicts.
 1.3 25-Jul-2021  rillig tests/lint: try harder to reduce 'abstract_declarator: T_TYPEOF'

At the top level of a type_name, declaration-specifiers take precedence,
but these cannot look inside the parentheses of a
direct-abstract-declarator.
 1.2 25-Jul-2021  rillig tests/lint: document unreachable 'abstract_declarator: T_TYPEOF'
 1.1 25-Jul-2021  rillig tests/lint: test parsing of type_name
 1.8 17-Jun-2022  rillig 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'.
 1.7 01-Apr-2022  rillig lint: add type details to message about 'sizeof(function)'

The code in add_function is severely broken, it mixes up the return type
of the function with the argument types. For now, at least show the
guessed type in the diagnostic, to allow human readers quickly spot the
bug.

Extend the test cases in decl_direct_abstract.c to show that the
behavior differs unreasonably if the first parameter of the function is
equal to its return type.
 1.6 25-Jul-2021  rillig tests/lint: explain where the second __attribute__ comes from
 1.5 25-Jul-2021  rillig tests/lint: fix unintended line breaks
 1.4 25-Jul-2021  rillig lint: fix parsing of 'typeof(double(typeof(0.0)))'

By removing the misplaced grammar rule 'abstract_declarator: T_TYPEOF',
the type expression 'typeof(double(typeof(0.0)))' is no longer
interpreted as a declarator, but rather as a type specifier, just as in
the GCC parser.

This resolves 7 shift/reduce conflicts.
 1.3 25-Jul-2021  rillig tests/lint: try harder to reduce 'abstract_declarator: T_TYPEOF'

At the top level of a type_name, declaration-specifiers take precedence,
but these cannot look inside the parentheses of a
direct-abstract-declarator.
 1.2 25-Jul-2021  rillig tests/lint: document unreachable 'abstract_declarator: T_TYPEOF'
 1.1 25-Jul-2021  rillig tests/lint: test parsing of type_name
 1.6 08-Jun-2024  rillig lint: add details to warnings about negative constant to unsigned
 1.5 27-Mar-2024  rillig lint: don't use 'long' in diagnostics

The size of 'long' differs between 64-bit and 32-bit platforms.
Eliminate this possible platform-dependency.
 1.4 27-Feb-2023  rillig lint: split platform-specific test for loss of accuracy

Lint distinguishes between platforms where size_t is unsigned int and
platforms where size_t is unsigned long.
 1.3 22-Feb-2023  rillig tests/lint: add platform-specific tests
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.3 17-Jun-2022  rillig 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'.
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.3 28-Jan-2024  rillig tests/lint: sort diagnostics in ilp32 tests chronologically
 1.2 27-Jan-2024  rillig lint: fix type of large integer constants
 1.1 27-Jan-2024  rillig tests/lint: test integer constants in different language levels
 1.3 28-Jan-2024  rillig tests/lint: sort diagnostics in ilp32 tests chronologically
 1.2 27-Jan-2024  rillig lint: fix type of large integer constants
 1.1 27-Jan-2024  rillig tests/lint: test integer constants in different language levels
 1.9 28-Jan-2025  rillig tests/lint: fix platform-specific tests for <ctype.h> usage

On arm (32-bit, ptrdiff_t is long), there was an extra warning that
didn't show up on i386 or x86_64.

After moving the test to the platform-specific tests, the i386 test shows
an additional warning about integer overflow. This is because the
platform-specific tests run with more lint warnings enabled than in
msg_341.c.
 1.8 30-Mar-2024  rillig branches: 1.8.2;
lint: do not convert array subscripts from size_t to ptrdiff_t

The C standards do not specify a fixed type for an array subscript, it
just has to be an integer type. Previously, query 4 fired for the
ubiquitous expression 'ptr[sz]' when sz had type 'size_t'.

The test platform_ilp32_long is unaffected by this change, as the
integer constant 0x80000000 has type 'unsigned int', while size_t is
'unsigned long' on those platforms, and even though the types 'unsigned
int' and 'unsigned long' have the same value space, there's still a
conversion, at least for now.
 1.7 30-Mar-2024  rillig lint: reword messages about array subscripts to sound more natural
 1.6 10-Mar-2024  rillig lint: add details to the message about integer overflow

Having only the operator was too unspecific to be actionable, so add the
actual numbers and the data type.
 1.5 10-Mar-2024  rillig lint: saturate signed integer overflow

In array address calculations, this prevents a 'array subscript cannot
be negative' for large array subscripts.
 1.4 09-Mar-2024  rillig tests/lint: demonstrate integer overflow on lp64 platforms
 1.3 09-Mar-2024  rillig tests/lint: test check for out-of-bounds array index
 1.2 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.1 27-Feb-2023  rillig lint: split platform-specific test for loss of accuracy

Lint distinguishes between platforms where size_t is unsigned int and
platforms where size_t is unsigned long.
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.10 28-Jan-2025  rillig tests/lint: fix platform-specific tests for <ctype.h> usage

On arm (32-bit, ptrdiff_t is long), there was an extra warning that
didn't show up on i386 or x86_64.

After moving the test to the platform-specific tests, the i386 test shows
an additional warning about integer overflow. This is because the
platform-specific tests run with more lint warnings enabled than in
msg_341.c.
 1.9 30-Mar-2024  rillig branches: 1.9.2;
lint: reword messages about array subscripts to sound more natural
 1.8 10-Mar-2024  rillig lint: add details to the message about integer overflow

Having only the operator was too unspecific to be actionable, so add the
actual numbers and the data type.
 1.7 10-Mar-2024  rillig lint: saturate signed integer overflow

In array address calculations, this prevents a 'array subscript cannot
be negative' for large array subscripts.
 1.6 09-Mar-2024  rillig tests/lint: demonstrate integer overflow on lp64 platforms
 1.5 09-Mar-2024  rillig tests/lint: test check for out-of-bounds array index
 1.4 08-Jul-2023  rillig lint: do not use portable type sizes in integer constraints

This reverts the change from tree.c 1.547 from 2023-07-03. Back then, I
didn't know that the actual value from a type's 'portable size in bits'
was not supposed to be used.
 1.3 03-Jul-2023  rillig lint: consistently use portable type size in integer constraints

Since tree.c 1.546 from 2023-07-03, lint no longer warned about possible
loss of accuracy when converting from 'long' to 'int' on an ILP32
platform that uses 'unsigned long' for size_t, when run in portable mode
(-p), which is enabled by default in the NetBSD build.

The integer constraints avoid false-positive warnings by looking at the
actual values an expression can take. The function can_represent is
guarded by a condition that uses the portable_size_in_bits, but then
internally used the opposite size_in_bits, which led to inconsistent
results.

The warning looks confusing though, as on an ILP32 platform, 'int' and
'long' have the same size and representation, therefore there cannot be
an actual loss of accuracy. The warning may need to be reworded to
explicitly mention the portability mode, in which sizeof(int) is assumed
to be 3 instead of 4, to catch possible loss of accuracy on other
platforms.
 1.2 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.1 27-Feb-2023  rillig lint: split platform-specific test for loss of accuracy

Lint distinguishes between platforms where size_t is unsigned int and
platforms where size_t is unsigned long.
 1.9.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 07-Feb-2024  rillig tests/lint: sync test for integer constant type on ILP32 platforms

The test was broken since lex.c 1.214 from today.
 1.3 28-Jan-2024  rillig tests/lint: sort diagnostics in ilp32 tests chronologically
 1.2 27-Jan-2024  rillig lint: fix type of large integer constants
 1.1 27-Jan-2024  rillig tests/lint: test integer constants in different language levels
 1.6 09-Jul-2023  rillig lint: remove redundant '#' after 'argument' in diagnostics
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 16-Apr-2022  rillig tests/lint: fix tests on platforms other than x86_64

In msg_259_ilp32.c 1.6 from 2022-04-15, I removed the option -S from the
test in order to keep the message 259, but I forgot to fix the C99-style
comment as well.

In platform_int.c, the default lint option -S no longer generated
warning 259, so remove that option.
 1.3 26-Sep-2021  rillig tests/lint: explain difference between i386 and sparc for 259

Seen in usr.bin/make/cond.c 1.278 from 2021-09-21, line 800, the call to
is_token, where unsigned char gets converted to unsigned int or unsigned
long, depending on the platform.
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.3 17-Jun-2022  rillig 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'.
 1.2 26-Sep-2021  rillig tests/lint: explain difference between i386 and sparc for 259

Seen in usr.bin/make/cond.c 1.278 from 2021-09-21, line 800, the call to
is_token, where unsigned char gets converted to unsigned int or unsigned
long, depending on the platform.
 1.1 26-Sep-2021  rillig 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.
 1.7 10-Apr-2025  rillig lint: remove now-unnecessary CONSTCOND comments
 1.6 05-Jul-2023  rillig branches: 1.6.2;
tests/lint: spell platform identifiers for 'long double' consistently

The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
 1.5 05-Apr-2023  rillig lint: fix duplicate warning when parsing big float constants
 1.4 05-Apr-2023  rillig tests/lint: demonstrate duplicate warning when parsing big floats
 1.3 22-Feb-2023  rillig tests/lint: add platform-specific tests
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.6 10-Apr-2025  rillig lint: remove now-unnecessary CONSTCOND comments
 1.5 05-Jul-2023  rillig branches: 1.5.2;
tests/lint: spell platform identifiers for 'long double' consistently

The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
 1.4 05-Apr-2023  rillig tests/lint: demonstrate duplicate warning when parsing big floats
 1.3 22-Feb-2023  rillig tests/lint: add platform-specific tests
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.7 10-Apr-2025  rillig lint: remove now-unnecessary CONSTCOND comments
 1.6 05-Jul-2023  rillig branches: 1.6.2;
tests/lint: spell platform identifiers for 'long double' consistently

The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
 1.5 05-Apr-2023  rillig lint: fix duplicate warning when parsing big float constants
 1.4 05-Apr-2023  rillig tests/lint: demonstrate duplicate warning when parsing big floats
 1.3 22-Feb-2023  rillig tests/lint: add platform-specific tests
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.6 05-Nov-2024  rillig lint: fix cross references in comments
 1.5 28-Mar-2023  rillig branches: 1.5.2;
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.3 26-Sep-2021  rillig tests/lint: explain difference between i386 and sparc for 259

Seen in usr.bin/make/cond.c 1.278 from 2021-09-21, line 800, the call to
is_token, where unsigned char gets converted to unsigned int or unsigned
long, depending on the platform.
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.2 26-Sep-2021  rillig tests/lint: explain difference between i386 and sparc for 259

Seen in usr.bin/make/cond.c 1.278 from 2021-09-21, line 800, the call to
is_token, where unsigned char gets converted to unsigned int or unsigned
long, depending on the platform.
 1.1 26-Sep-2021  rillig 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.
 1.19 15-May-2025  rillig lint: handle __attribute__ after a declarator
 1.18 15-May-2025  rillig lint: handle __attribute__ at the beginning of a declaration
 1.17 14-May-2025  rillig lint: accept '__attribute__((mode(TI)))' before 'unsigned'
 1.16 14-May-2025  rillig tests/lint: demonstrate missing __attribute__((mode(TI))) cases

Seen in compiler_rt/popcountti2.c.
 1.15 28-Jan-2025  rillig tests/lint: fix platform-specific tests for <ctype.h> usage

On arm (32-bit, ptrdiff_t is long), there was an extra warning that
didn't show up on i386 or x86_64.

After moving the test to the platform-specific tests, the i386 test shows
an additional warning about integer overflow. This is because the
platform-specific tests run with more lint warnings enabled than in
msg_341.c.
 1.14 30-Mar-2024  rillig branches: 1.14.2;
lint: do not convert array subscripts from size_t to ptrdiff_t

The C standards do not specify a fixed type for an array subscript, it
just has to be an integer type. Previously, query 4 fired for the
ubiquitous expression 'ptr[sz]' when sz had type 'size_t'.

The test platform_ilp32_long is unaffected by this change, as the
integer constant 0x80000000 has type 'unsigned int', while size_t is
'unsigned long' on those platforms, and even though the types 'unsigned
int' and 'unsigned long' have the same value space, there's still a
conversion, at least for now.
 1.13 30-Mar-2024  rillig lint: reword messages about array subscripts to sound more natural
 1.12 10-Mar-2024  rillig lint: add details to the message about integer overflow

Having only the operator was too unspecific to be actionable, so add the
actual numbers and the data type.
 1.11 10-Mar-2024  rillig lint: saturate signed integer overflow

In array address calculations, this prevents a 'array subscript cannot
be negative' for large array subscripts.
 1.10 10-Mar-2024  rillig tests/lint: enable test for integer overflow in array index
 1.9 09-Mar-2024  rillig tests/lint: demonstrate integer overflow on lp64 platforms
 1.8 09-Mar-2024  rillig tests/lint: test check for out-of-bounds array index
 1.7 08-Jul-2023  rillig lint: warn about conversion from 128-bit to smaller integer types
 1.6 08-Jul-2023  rillig tests/lint: demonstrate missing warning for converting int128_t
 1.5 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.4 22-Feb-2023  rillig tests/lint: add platform-specific tests
 1.3 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.14.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 17-Jun-2022  rillig 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'.
 1.3 11-Jun-2022  rillig lint: add quotes around a few more placeholders in messages
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.3 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.2 27-Jan-2024  rillig lint: fix type of large integer constants
 1.1 27-Jan-2024  rillig tests/lint: test integer constants in different language levels
 1.3 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.2 27-Jan-2024  rillig lint: fix type of large integer constants
 1.1 27-Jan-2024  rillig tests/lint: test integer constants in different language levels
 1.4 07-Feb-2024  rillig lint: unify rules for determining the type of an integer constant

Previously, in traditional C mode, large decimal numbers were treated as
unsigned, which disagreed with the book from 1978.
 1.3 28-Jan-2024  rillig tests/lint: sort multiple diagnostics per line chronologically

For now, the chronologic order is not enforced but has to be established
manually, for example by removing all 'expect' comment lines and
regenerating them with 'accept.sh -u'.

While here, clean up a few instances that came up when regenerating the
'expect' comments, such as wrong indentation or needless deviation from
the 'expect+1' form.
 1.2 27-Jan-2024  rillig lint: fix type of large integer constants
 1.1 27-Jan-2024  rillig tests/lint: test integer constants in different language levels
 1.7 07-Apr-2025  rillig lint: remove warning about 'constant in conditional context'

This makes the '-X 161' option to lint invalid.
 1.6 08-Jun-2024  rillig branches: 1.6.2;
lint: add details to warnings about negative constant to unsigned
 1.5 02-Dec-2023  rillig tests/lint: add more test cases for nonportable character comparison
 1.4 22-Feb-2023  rillig lint: fix confusing message about nonportable character constants
 1.3 22-Feb-2023  rillig tests/lint: add platform-specific tests
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.6 07-Apr-2025  rillig lint: remove warning about 'constant in conditional context'

This makes the '-X 161' option to lint invalid.
 1.5 08-Jun-2024  rillig branches: 1.5.2;
lint: add details to warnings about negative constant to unsigned
 1.4 02-Dec-2023  rillig tests/lint: add more test cases for nonportable character comparison
 1.3 22-Feb-2023  rillig tests/lint: add platform-specific tests
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 17-Jun-2022  rillig 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'.
 1.2 26-Sep-2021  rillig tests/lint: run all platform tests with the same options
 1.1 26-Sep-2021  rillig 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.
 1.36 14-Sep-2025  rillig lint: add more type details to several messages

In most expressions, the integer promotions are performed on the
operands, making the actual type different from the "visible" type of an
operand. To properly explain the situation, mention the type before the
integer promotions in case it differs from the resulting type.
 1.35 12-Apr-2025  rillig lint: s/illegal/invalid/g

Lint does not provide legal advice.
 1.34 20-Feb-2025  rillig lint: mention the assignment operator in 'illegal combination'

In source lines that contain both a 'return' statement as well as a
function-like macro, such as the C11 atomics, seeing the word 'init' in
the diagnostic helps to see that the type conflict is not in the
'return' statement but instead in some initializer.

Seen in userspace-rcu/wfcqueue.h:147.
 1.33 30-Nov-2024  rillig tests/lint: add a few more tests to increase code coverage
 1.32 29-Nov-2024  rillig lint: in a query, treat 00 as an octal integer constant

Even though the value of the constant is 0 and thus the same as in the
decimal interpretation, it is syntactically an octal number and contains
a redundant leading digit, which may be interesting to detect.
 1.31 28-Nov-2024  rillig lint: add queries for typedefs to struct/union and their pointers

As suggested in share/misc/style since 1.75 from August 2023.

These are queries instead of warnings as the number of false positives or
historical practice is too high; these queries are only intended for
detecting these typedefs on newly added types.
 1.30 23-Nov-2024  rillig lint: add details to messages about discarding qualifiers

The related message 153 is left as-is, as it is used in two places, and
the second place is not only about discarded qualifiers.
 1.29 27-Apr-2024  rillig branches: 1.29.2;
lint: converting a null pointer to another pointer type is not narrowing
 1.28 27-Apr-2024  rillig lint: add query for conversion from void pointer to other pointer
 1.27 30-Mar-2024  rillig lint: in the query about implicit conversions, ignore casts
 1.26 30-Mar-2024  rillig lint: add query for implicit integer-to-floating conversion
 1.25 30-Mar-2024  rillig lint: do not convert array subscripts from size_t to ptrdiff_t

The C standards do not specify a fixed type for an array subscript, it
just has to be an integer type. Previously, query 4 fired for the
ubiquitous expression 'ptr[sz]' when sz had type 'size_t'.

The test platform_ilp32_long is unaffected by this change, as the
integer constant 0x80000000 has type 'unsigned int', while size_t is
'unsigned long' on those platforms, and even though the types 'unsigned
int' and 'unsigned long' have the same value space, there's still a
conversion, at least for now.
 1.24 02-Feb-2024  rillig tests/lint: test lexing of characters and strings
 1.23 28-Jan-2024  rillig tests/lint: enforce diagnostics to be listed in chronologic order

While here, fix the tests on uchar platforms.
 1.22 20-Jan-2024  rillig lint: add query for const automatic variables
 1.21 07-Jan-2024  rillig lint: allow querying for invisible characters in literals and constants
 1.20 10-Dec-2023  rillig lint: allow querying for 'static' followed by non-'static' declaration
 1.19 03-Jul-2023  rillig tests/lint: move platform-specific query tests to separate files

This fixes the tests on 'unsigned char' platforms.

Thanks martin@ for the notification.
 1.18 30-Jun-2023  rillig lint: add query for assigning an integer 0 to a pointer
 1.17 24-Jun-2023  rillig lint: add query for comparing 'char' with plain integers
 1.16 24-Jun-2023  rillig lint: add query for redundant 'extern' in function declaration
 1.15 22-Jun-2023  rillig lint: add query for comma operator
 1.14 03-Jun-2023  rillig lint: add query for static variables in functions

This query allows finding hidden global variables, as an easier-to-read
alternative to 'objdump -t'.
 1.13 13-May-2023  rillig lint: add query for chained assignments
 1.12 15-Apr-2023  rillig lint: add query for parenthesized return value
 1.11 31-Mar-2023  rillig lint: allow querying for octal integer constants
 1.10 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.9 15-Jan-2023  rillig tests/lint: document conversion from void pointer
 1.8 08-Jan-2023  rillig lint: do not report usual arithmetic conversions for constants
 1.7 08-Jan-2023  rillig lint/tests: test query for usual arithmetic conversions
 1.6 24-Sep-2022  rillig tests/lint: fix test for queries on platforms where char is unsigned

error: queries.c(118): missing /* expect+1: implicit conversion
changes sign from 'char' to 'int' [Q3] */
error: queries.c(122): missing /* expect+1: implicit conversion
changes sign from 'char' to 'int' [Q3] */
 1.5 10-Sep-2022  rillig tests/lint: fix test for queries on platforms where char is unsigned

These platforms reported an additional "implicit conversion changes
sign" in lines 105, 105, 118, 122.
 1.4 28-Aug-2022  rillig lint: rename dcs manipulation functions to be clearer

No functional change.
 1.3 08-Jul-2022  rillig lint: fix edge cases in the query for redundant cast before assignment

Casting from and to _Bool is only allowed outside strict bool mode.
Outside strict bool mode, _Bool is an integer type, therefore return
early if any of the operands has type _Bool. In strict bool mode, even
casting from _Bool to _Bool is not allowed, as it is not needed in
practice.

Handle _Complex types before real floating-point types. Return early
for _Complex types, as these are floating-point types as well.

For pointer casts, not only flag casts to or from 'pointer to void', but
also casts between the same types.

In debug mode, when constructing the type '_Complex float', the type
name of '_Complex' occurs in the debug log. Outside of debug mode,
printing this type name is an error since this type keyword only occurs
internally, when constructing a type. At that point, it is not supposed
to occur in any user-visible message.
 1.2 08-Jul-2022  rillig lint: fix query for redundant cast before assignment

Previously, 'i = (int)dbl' was marked as redundant, even though it
performs a value conversion.
 1.1 05-Jul-2022  rillig 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@
 1.29.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 28-Jan-2024  rillig tests/lint: enforce diagnostics to be listed in chronologic order

While here, fix the tests on uchar platforms.
 1.1 03-Jul-2023  rillig tests/lint: move platform-specific query tests to separate files

This fixes the tests on 'unsigned char' platforms.

Thanks martin@ for the notification.
 1.2 28-Jan-2024  rillig tests/lint: enforce diagnostics to be listed in chronologic order

While here, fix the tests on uchar platforms.
 1.1 03-Jul-2023  rillig tests/lint: move platform-specific query tests to separate files

This fixes the tests on 'unsigned char' platforms.

Thanks martin@ for the notification.
 1.4 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.3 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.2 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.1 19-Jun-2021  rillig lint: fix assertion after malformed for loop

Found using afl.
 1.3 17-Jun-2022  rillig 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'.
 1.2 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.1 19-Jun-2021  rillig lint: fix assertion after malformed for loop

Found using afl.
 1.3 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.2 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.1 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.2 17-Jun-2022  rillig 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'.
 1.1 14-Jul-2021  rillig tests/lint: add several tests for edge cases in the grammar
 1.3 28-Mar-2023  rillig lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
 1.2 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.1 11-Jul-2021  rillig tests/lint: test dangling else
 1.2 17-Jun-2022  rillig 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'.
 1.1 11-Jul-2021  rillig tests/lint: test dangling else
 1.85 03-Jan-2025  rillig tests/lint: run lint1 tests in one fell swoop

This generates fewer details in the ATF test reports, as the
platform-specific tests that are skipped are not mentioned individually.
 1.84 08-Jun-2024  rillig branches: 1.84.2;
tests/lint: remove unused lint1-skip-if selector
 1.83 02-Feb-2024  rillig tests/lint: test UTF-8 mode
 1.82 05-Jul-2023  rillig tests/lint: spell platform identifiers for 'long double' consistently

The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
 1.81 24-Jun-2023  rillig tests/lint: allow accept.sh to override lint1 for local testing
 1.80 22-May-2023  rillig tests/lint1: allow whitespace in files containing the expected output

This reduces the amount of wizardry needed to interpret the files. For
a more gentle introduction of the file format, see ../lint2/msg_000.ln.

The whitespace that is removed is very similar to the one in the lint2
tests, the difference is that '%<space>' and '%#' need to be preserved
in abbreviated printf and scanf format strings.
 1.79 10-Apr-2023  rillig tests/lint: demonstrate wrong warning with complex numbers
 1.78 06-Feb-2023  rillig tests/lint: sync reference to platform properties generator
 1.77 06-Feb-2023  rillig lint: eliminate unnecessary indirection

No functional change.
 1.76 17-Jun-2022  rillig 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'.
 1.75 26-Feb-2022  rillig lint: fix memory corruption in statement expressions (since 2021-12-17)

The commit that introduced the assertion failure looks innocent, it only
adds a few predefined functions for GCC mode. Nevertheless, before that
commit, lint consistently complained about 'error: void type illegal in
expression [109]', which doesn't make sense either.

This fix also removes the creative use of the initialization stack to
store the type of the statement expression. Having a separate stack for
these statement expressions makes the code easier to understand.
 1.74 26-Feb-2022  rillig tests/lint: demonstrate assertion failure in GCC compound expression
 1.73 10-Oct-2021  rillig tests/lint: remove duplicate platform, generate platforms list

It was an unreliable idea to extract the platform properties from the
targparam.h files manually, even if it was a one-time job. I still made
a mistake by accidentally marking aarch64 as schar, even though it is
uchar, plus I duplicated the line for powerpc64.

Remove the duplicate line, no functional change.
 1.72 10-Oct-2021  skrll aarch64 has unsigned char
 1.71 26-Sep-2021  rillig 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.
 1.70 10-Sep-2021  rillig lint: replace space followed by tab with simply tab

No functional change.
 1.69 21-Aug-2021  rillig tests/lint: guard against typos in test environment configuration

Some tests had "lint1-only-if" without a trailing colon, others included
the trailing colon. The tests that included the trailing colon were run
even though they were supposed to be skipped, and they failed, as could
be expected.

To prevent further typos, always require the trailing colon, just as in
"lint1-flags" and fail fast on unknown "lint1" comments.
 1.68 13-Jul-2021  rillig 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.
 1.67 11-Jul-2021  rillig tests/lint: rework ATF test driver

To skip tests that work only on particular platforms, a simple 'eval'
from the shell does not work since it does not exit on failure. Fix
this by storing the commands in a local variable first.

Remove configuration knobs 'lint1-only-if-arch' and 'lint1-skip-if-arch'
since they are unused.

When skipping a test, actually mark it as skipped in the ATF statistics.
 1.66 29-Jun-2021  rillig 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".
 1.65 29-Jun-2021  rillig 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.
 1.64 29-Jun-2021  rillig tests/lint: allow tests to be skipped depending on platform properties
 1.63 27-Jun-2021  rillig tests/lint: fix selection of the .exp-ln file

Since t_integration.sh 1.58 from today, the expected .ln output was not
detected anymore. Changes to the file format would have gone unnoticed.
 1.62 27-Jun-2021  rillig tests/lint: remove list of test names from t_integration

By convention, each *.c file in the source directory is a test case.

There is no need to list them individually and redundantly.

There is also no need to group the tests for the individual messages.
This ensures that each test is run in the regular builds. Previously,
the test all_messages stopped after the first failure.
 1.61 27-Jun-2021  rillig 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".
 1.60 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.59 27-Jun-2021  rillig tests/lint: allow skipping individual tests

Depending on the platform, some tests do not make sense or produce
platform-dependent results. Allow these tests to be marked as such.

For example, the test lex_integer.c only works on 64-bit platforms.
Therefore it is disabled on i386 for now since it prints different
warnings there. Even better would be a "lint1-only-on-lpi32" toggle,
but that would need detection of 'sizeof(int)' at runtime.
 1.58 27-Jun-2021  rillig tests/lint: rename expected .ln file to .exp-ln

This way, the hack for suffixes is no longer needed.
 1.57 20-Jun-2021  rillig tests/lint: test syntax error in initialization using designator

This test prepares the upcoming refactoring of the grammar.
 1.56 19-Jun-2021  rillig lint: fix endless loop on unfinished comment at EOF

Found using afl.
 1.55 19-Jun-2021  rillig lint: fix assertion after malformed for loop

Found using afl.
 1.54 19-Jun-2021  rillig lint: fix assertion failure in struct with unnamed member

Found using afl.
 1.53 19-Jun-2021  rillig tests/lint: add test cases for lexical analysis
 1.52 16-Jun-2021  rillig tests/lint: sort the list of test cases

No functional change.
 1.51 16-Jun-2021  rillig tests/lint: clean up ATF test driver

No functional change.
 1.50 16-May-2021  rillig 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]
 1.49 14-May-2021  rillig tests/lint: test bitwise mismatch in switch statement
 1.48 03-May-2021  rillig branches: 1.48.2;
tests/lint: remove outdated comment

The test d_gcc_extension is already activated in line 121.
 1.47 02-May-2021  rillig tests/lint: add test for bit-field types in GCC mode
 1.46 02-May-2021  rillig tests/lint: demonstrate missing support for __packed __aligned
 1.45 30-Apr-2021  rillig tests/lint: add very basic tests for GCC __attribute__
 1.44 22-Apr-2021  rillig tests/lint: add test for typeof after statement

Found by christos@.
 1.43 18-Apr-2021  rillig 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.
 1.42 17-Apr-2021  rillig tests/lint: demonstrate assertion failure in initialization
 1.41 14-Apr-2021  rillig lint: add test for newly added message about static array size
 1.40 08-Apr-2021  rillig 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.
 1.39 05-Apr-2021  rillig 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
 1.38 02-Apr-2021  rillig tests/lint: prevent typo from tree.c 1.264 from happening again
 1.37 28-Mar-2021  rillig 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.
 1.36 27-Mar-2021  rillig tests/lint: move description of tests into the tests themselves

In most cases the descriptions didn't add much to the test name anyway.
 1.35 27-Mar-2021  rillig tests/lint: do not force tests to start with 'd_'

Using only parts of the test name files in t_integration.sh made it
unnecessarily difficult to find a test based on its filename. The tests
for the individual messages already have a different prefix.

No functional change.
 1.34 23-Mar-2021  rillig 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.
 1.33 07-Mar-2021  rillig lint: in strict C mode, warn about initialization with '[a ... b]'

https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html
 1.32 28-Feb-2021  rillig lint: fix null pointer dereference on parse error

Fixes PR bin/22119.
 1.31 28-Feb-2021  rillig lint: add test to demonstrate that PR bin/20264 has been fixed
 1.30 21-Feb-2021  rillig lint: add another test for C99 initializers
 1.29 19-Feb-2021  rillig lint: warn about mismatch in getopt handling
 1.28 18-Jan-2021  rillig lint: clean up code (mostly comments)
 1.27 17-Jan-2021  rillig lint: add more tests for system headers in strict bool mode
 1.26 14-Jan-2021  rillig lint: add tests for newly added messages for strict bool mode
 1.25 10-Jan-2021  rillig lint: allow custom flags to be specified in all unit tests

Previously, only the tests called msg_*.c could use this feature. Since
it is useful for other tests as well, enable it everywhere.
 1.24 10-Jan-2021  rillig lint: add test for triggering assertion failures in lint1
 1.23 10-Jan-2021  rillig 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.
 1.22 10-Jan-2021  rillig lint: demonstrate wrong handling of conversion to _Bool
 1.21 09-Jan-2021  rillig lint: allow tests to specify additional flags

Several of the tests only need to add the -p flag. Mentioning the
(current) default flags in each of these tests is redundant. Therefore,
allow them to specify "lint1-extra-flags: -p" instead of the current
"lint1-flags: -g -S -w -p".
 1.20 02-Jan-2021  rillig lint: fix integration test

The body of an ATF test must never return 1 but instead report failure
via atf_fail. Otherwise the following error message appears:

Failed: Test case body returned a non-ok exit code, but this is
not allowed

The test program t_integration intentionally bypasses the official ATF
API for performance reasons. But even then, it should stick to the API
as close as possible.
 1.19 02-Jan-2021  rillig lint: demonstrate that -t mode is practically unusable

Since main1.c from 2014-04-18, running lint in -t mode produces strange
warnings in lines 1 to 3 of no file at all.

This is caused by the builtins that are parsed in main(). These
builtins are incompatible with traditional mode because they use long
double, which had not been known at that time.
 1.18 02-Jan-2021  rillig 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.
 1.17 01-Jan-2021  rillig lint: demonstrate bug in handling of nested C9X struct initializers
 1.16 01-Jan-2021  rillig lint: fix segmentation fault when checking returned enum types (211)
 1.15 31-Dec-2020  rillig lint: check that in "if (cond)", cond is scalar
 1.14 30-Dec-2020  rillig lint: remove a bit of redundancy from the test suite
 1.13 30-Dec-2020  rillig lint: add test for old style function arguments
 1.12 28-Dec-2020  rillig lint1: remove redundant description from tests
 1.11 28-Dec-2020  rillig lint1: add forgotten tests
 1.10 28-Dec-2020  rillig lint1: use tabular layout for listing the test cases
 1.9 28-Dec-2020  rillig lint1: remove redundancy from test definitions

Whether a test is supposed to produce lint warnings is determined by the
corresponding .exp file. There is no need to encode this information
redundantly in the test driver.
 1.8 28-Dec-2020  rillig 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.
 1.7 28-Dec-2020  rillig lint1: add test for initializing nested structs

Discovered in var.c 1.774 from 2020-12-28.
 1.6 28-Dec-2020  rillig lint: for tests with output, ensure that the output matches
 1.5 25-Jun-2020  jruoho Reference PRs consistently.
 1.4 21-Apr-2014  christos disable the extension test for now.
 1.3 17-Apr-2014  christos add more tests
 1.2 04-Feb-2014  njoly branches: 1.2.2;
Handle another declaration after statement case for lint in c99 mode.
Add the corresponding testcase.
 1.1 17-Mar-2012  jruoho branches: 1.1.2; 1.1.4;
Deprecate tests/util.
 1.1.4.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.3 22-May-2014  yamt 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")
 1.1.2.2 17-Apr-2012  yamt sync with head
 1.1.2.1 17-Mar-2012  yamt file t_integration.sh was added on branch yamt-pagecache on 2012-04-17 00:09:23 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.48.2.1 31-May-2021  cjep sync with head
 1.84.2.1 02-Aug-2025  perseant Sync with HEAD
 1.28 31-Aug-2025  rillig lint: check for mismatches in snprintb conversions

Seen in sh3/dmacreg.h, SH3_DMAC_CHCR_BITS.
 1.27 08-Dec-2024  rillig lint: warn about do-while macros that end with a semicolon
 1.26 01-Dec-2024  rillig lint: warn about function definitions that still use identifier lists
 1.25 28-Nov-2024  rillig lint: add queries for typedefs to struct/union and their pointers

As suggested in share/misc/style since 1.75 from August 2023.

These are queries instead of warnings as the number of false positives or
historical practice is too high; these queries are only intended for
detecting these typedefs on newly added types.
 1.24 23-Nov-2024  rillig lint: use separate message when discarding a qualifier in call
 1.23 10-Jul-2024  rillig lint: add warning for '!(var = constant)'

This catches expressions like 'ATF_CHECK(errno = ENOENT)', which was
intended to use '==' instead of '='.
 1.22 09-Jun-2024  rillig branches: 1.22.2;
lint: warn about lossy floating point constant to integer conversions
 1.21 11-May-2024  rillig lint: warn when comparing an integer to a floating point constant
 1.20 27-Apr-2024  rillig lint: add query for conversion from void pointer to other pointer
 1.19 30-Mar-2024  rillig lint: add query for implicit integer-to-floating conversion
 1.18 03-Mar-2024  rillig lint: check for unreachable bits and fields in snprintb formats

While here, clean up a few existing checks.
 1.17 02-Mar-2024  rillig lint: check snprintb formats for overlapping bits and fields
 1.16 01-Mar-2024  rillig lint: test format strings from snprintb calls

The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct. Provide some assistance in
catching the most common mistakes.
 1.15 03-Feb-2024  rillig lint: warn about short octal escape followed by '8' or '9'

These mistakes is typically found in snprintb format directives but is
probably a typo everywhere else as well.
 1.14 20-Jan-2024  rillig lint: add query for const automatic variables
 1.13 07-Jan-2024  rillig lint: allow querying for invisible characters in literals and constants
 1.12 10-Dec-2023  rillig lint: allow querying for 'static' followed by non-'static' declaration
 1.11 03-Aug-2023  rillig lint: make '_Static_assert' only available in C11 or C23 mode
 1.10 02-Jul-2023  rillig lint: add initial support for C23

Required by xsrc/external/mit/MesaLib.old, brw_eu_validate.c, which
initializes a struct using empty braces: 'return (struct string){};'.
 1.9 30-Jun-2023  rillig lint: add query for assigning an integer 0 to a pointer
 1.8 28-Jun-2023  rillig tests/lint: use standard form of ATF tests, test removing output file
 1.7 24-Jun-2023  rillig lint: add query for comparing 'char' with plain integers
 1.6 24-Jun-2023  rillig lint: add query for redundant 'extern' in function declaration
 1.5 22-Jun-2023  rillig lint: add query for comma operator
 1.4 03-Jun-2023  rillig lint: add query for static variables in functions

This query allows finding hidden global variables, as an easier-to-read
alternative to 'objdump -t'.
 1.3 13-May-2023  rillig lint: add query for chained assignments
 1.2 23-Apr-2023  rillig lint: be strict when parsing command line for excluded message IDs

Previously, lint accepted -X '1, 2, 3', while the manual page lists the
IDs without spaces.

On 32-bit platforms, lint accepted -X -4294967295, and on 64-bit
platforms, it accepted the corresponding larger numbers.

The code for parsing message IDs and query IDs conceptually does the
same, but the implementations differed for no reason.
 1.1 23-Apr-2023  rillig tests/lint: test command line parsing for message and query IDs

The parsing methods differ but shouldn't.
 1.22.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 28-Aug-2021  rillig tests/lint: demonstrate hashcode sorting of the lint2 output

The hashcodes modulo 1009 are:

48 func7000
637 func0000
646 no_prototype
697 func1000
757 func2000
817 func3000
877 func4000
937 func5000
997 func6000
 1.7 24-Aug-2021  rillig lint: allow libraries to use 128-bit integer types
 1.6 08-Aug-2021  rillig tests/lint: include but don't run read_lp64 on 32-bit platforms

The lint1 tests are all in the machine-independent file list, which
makes it easier to manage them. At run time, some of them are skipped
based on platform characteristics. Do the same for the lint2 tests.

Having the lint2 test named read_lp64 as the only machine-dependent test
would complicate things.

The build for i386 had failed because the files for read_lp64 were
listed in distrib/sets/lists/tests/mi but were not actually installed.
 1.5 08-Aug-2021  rillig tests/lint: mips64 is not a 64-bit platform

See usr.bin/xlint/arch/mips64/targparam.h.
 1.4 08-Aug-2021  rillig tests/lint: make list of tests simpler

Since the file /usr/tests/usr.bin/xlint/lint2/tests has only been in the
file set for a few minutes, it is not marked as obsolete but simply
removed.
 1.3 07-Aug-2021  rillig tests/lint: test reading of 128-bit integer types and printf
 1.2 07-Aug-2021  rillig tests/lint: add test for reading the lint1 output
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.5 04-Sep-2021  rillig tests/lint: test old-style functions in a lint library

To really qualify as old-style, a function must not declare a return
type in its definition.
 1.4 04-Sep-2021  rillig tests/lint: test writing of a lint library

The code for that is almost the same as in lint1, but only almost.
 1.3 28-Aug-2021  rillig lint: write the entries for the libraries in alphabetical order

This makes them easier to read by humans.

The checks are still performed in hashcode order since there are no
tests that would cover this change.
 1.2 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.1 24-Aug-2021  rillig lint: allow libraries to use 128-bit integer types
 1.7 05-Nov-2024  rillig lint: fix cross references in comments
 1.6 01-Oct-2022  rillig branches: 1.6.4;
lint: miscellaneous cleanup

No functional change.
 1.5 15-Jan-2022  rillig tests/lint: fix comments
 1.4 04-Sep-2021  rillig tests/lint: test old-style functions in a lint library

To really qualify as old-style, a function must not declare a return
type in its definition.
 1.3 04-Sep-2021  rillig tests/lint: test writing of a lint library

The code for that is almost the same as in lint1, but only almost.
 1.2 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.1 24-Aug-2021  rillig lint: allow libraries to use 128-bit integer types
 1.6.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 28-Aug-2021  rillig lint: write the entries for the libraries in alphabetical order

This makes them easier to read by humans.

The checks are still performed in hashcode order since there are no
tests that would cover this change.
 1.2 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.1 24-Aug-2021  rillig lint: allow libraries to use 128-bit integer types
 1.2 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.1 24-Aug-2021  rillig lint: allow libraries to use 128-bit integer types
 1.2 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.1 05-Aug-2021  rillig branches: 1.1.4;
tests/lint: add test skeletons for messages from lint2
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.6 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.5 02-Aug-2023  rillig branches: 1.5.2;
lint: distinguish between arguments and parameters
 1.4 30-May-2022  rillig lint: clean up comments

No binary change.
 1.3 12-Sep-2021  rillig tests/lint: make documentation for lint2/msg_000 less ambiguous
 1.2 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.5.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.3 07-Aug-2021  rillig branches: 1.3.4;
tests/lint: add more tests for lint2
 1.2 06-Aug-2021  rillig tests/lint: add tests for declared but unused variables
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.7 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.6 14-Jan-2023  rillig branches: 1.6.2;
lint: rename lint2 functions to be more expressive
 1.5 01-Oct-2022  rillig lint: miscellaneous cleanup

No functional change.
 1.4 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.3 07-Aug-2021  rillig tests/lint: add more tests for lint2
 1.2 06-Aug-2021  rillig tests/lint: add tests for declared but unused variables
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.6.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 06-Aug-2021  rillig branches: 1.2.4;
tests/lint: add tests for declared but unused variables
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 06-Aug-2021  rillig tests/lint: add tests for declared but unused variables
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 07-Aug-2021  rillig branches: 1.2.4;
tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 07-Aug-2021  rillig tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 07-Aug-2021  rillig branches: 1.2.4;
tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 07-Aug-2021  rillig tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5 24-May-2025  rillig lint: fix wording in a warning about a type conflict

An object does not have a return type, only functions do.
 1.4 24-May-2025  rillig tests/lint: demonstrate wrong 'object returns' message
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 07-Aug-2021  rillig branches: 1.2.4;
tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5 24-May-2025  rillig tests/lint: demonstrate wrong 'object returns' message
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 07-Aug-2021  rillig tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 07-Aug-2021  rillig branches: 1.2.4;
tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 07-Aug-2021  rillig tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 30-Nov-2024  rillig tests/lint: test message 7 of lint2
 1.1 05-Aug-2021  rillig branches: 1.1.4;
tests/lint: add test skeletons for messages from lint2
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.2 30-Nov-2024  rillig tests/lint: test message 7 of lint2
 1.1 05-Aug-2021  rillig branches: 1.1.4;
tests/lint: add test skeletons for messages from lint2
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 14-Aug-2021  rillig branches: 1.2.4;
tests/lint: add tests for messages 8, 9 and 10
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 14-Aug-2021  rillig tests/lint: add tests for messages 8, 9 and 10
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 14-Aug-2021  rillig branches: 1.2.4;
tests/lint: add tests for messages 8, 9 and 10
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 14-Aug-2021  rillig tests/lint: add tests for messages 8, 9 and 10
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 14-Aug-2021  rillig branches: 1.2.4;
tests/lint: add tests for messages 8, 9 and 10
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 14-Aug-2021  rillig tests/lint: add tests for messages 8, 9 and 10
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.4 30-Nov-2024  rillig lint: fix type name of prototype function in lint2 messages

Since tyname.c 1.42 from 2021-06-28, when the type names for '(void)'
prototypes was fixed for lint1 but not for lint2.
 1.3 30-Nov-2024  rillig tests/lint: demonstrate wrong type name for prototype function
 1.2 07-Aug-2021  rillig branches: 1.2.4;
tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.6 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.5 30-Nov-2024  rillig lint: fix type name of prototype function in lint2 messages

Since tyname.c 1.42 from 2021-06-28, when the type names for '(void)'
prototypes was fixed for lint1 but not for lint2.
 1.4 30-Nov-2024  rillig tests/lint: demonstrate wrong type name for prototype function
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 07-Aug-2021  rillig tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 07-Aug-2021  rillig branches: 1.2.4;
tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.4 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.3 24-Aug-2021  rillig branches: 1.3.4;
tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 07-Aug-2021  rillig tests/lint: add more tests for lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 05-Aug-2023  rillig branches: 1.2.2;
tests/lint: test C99 printf conversion specifiers in lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.2 05-Aug-2023  rillig branches: 1.2.2;
tests/lint: test C99 printf conversion specifiers in lint2
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.1 05-Aug-2021  rillig branches: 1.1.4;
tests/lint: add test skeletons for messages from lint2
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.1 05-Aug-2021  rillig branches: 1.1.4;
tests/lint: add test skeletons for messages from lint2
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.3 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.2 01-Apr-2022  rillig branches: 1.2.4;
tests/lint2: add missing character in comment
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.1 05-Aug-2021  rillig branches: 1.1.4;
tests/lint: add test skeletons for messages from lint2
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.2 20-Feb-2025  rillig tests/lint: sync messages in test comments with their counterparts
 1.1 05-Aug-2021  rillig branches: 1.1.4;
tests/lint: add test skeletons for messages from lint2
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.2 28-Aug-2021  rillig branches: 1.2.4;
lint: sort the lint2 diagnostics by symbol name
 1.1 28-Aug-2021  rillig tests/lint: demonstrate hashcode sorting of the lint2 output

The hashcodes modulo 1009 are:

48 func7000
637 func0000
646 no_prototype
697 func1000
757 func2000
817 func3000
877 func4000
937 func5000
997 func6000
 1.2.4.1 02-Aug-2025  perseant Sync with HEAD
 1.2 15-Jan-2022  rillig tests/lint: fix comments
 1.1 28-Aug-2021  rillig tests/lint: demonstrate hashcode sorting of the lint2 output

The hashcodes modulo 1009 are:

48 func7000
637 func0000
646 no_prototype
697 func1000
757 func2000
817 func3000
877 func4000
937 func5000
997 func6000
 1.5 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.4 30-Aug-2021  rillig branches: 1.4.4;
tests/lint: test writing and reading .ln files

The test case for reading varargs functions is no longer necessary, the
code is covered by the newly added tests as well.

Test inline function and return value usage.
 1.3 30-Aug-2021  rillig tests/lint: test reading of varargs, printflike, scanflike
 1.2 30-Aug-2021  rillig lint: revert "remove redundant call to strchr" from yesterday

This "refactoring" broke the parsing code for varargs, printflike and
scanflike functions, and there were no tests for these. Revert for now,
maybe try again later, after adding the corresponding tests.
 1.1 07-Aug-2021  rillig tests/lint: add test for reading the lint1 output
 1.4.4.1 02-Aug-2025  perseant Sync with HEAD
 1.9 05-Nov-2024  rillig lint: fix cross references in comments
 1.8 02-Aug-2023  rillig branches: 1.8.2;
lint: distinguish between arguments and parameters
 1.7 03-Jul-2023  rillig lint: rename uppercase QUAD to LLONG

No binary change.
 1.6 22-May-2023  rillig lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.
 1.5 30-Aug-2021  rillig tests/lint: test writing and reading .ln files

The test case for reading varargs functions is no longer necessary, the
code is covered by the newly added tests as well.

Test inline function and return value usage.
 1.4 30-Aug-2021  rillig tests/lint: test reading of varargs, printflike, scanflike
 1.3 30-Aug-2021  rillig lint: revert "remove redundant call to strchr" from yesterday

This "refactoring" broke the parsing code for varargs, printflike and
scanflike functions, and there were no tests for these. Revert for now,
maybe try again later, after adding the corresponding tests.
 1.2 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.1 07-Aug-2021  rillig tests/lint: add test for reading the lint1 output
 1.8.2.1 02-Aug-2025  perseant Sync with HEAD
 1.1 07-Aug-2021  rillig tests/lint: test reading of 128-bit integer types and printf
 1.2 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.1 07-Aug-2021  rillig tests/lint: test reading of 128-bit integer types and printf
 1.1 07-Aug-2021  rillig tests/lint: test reading of 128-bit integer types and printf
 1.3 24-Aug-2021  rillig tests/lint: normalize whitespace in lint2 tests

Found a typo in read.ln, f124, which had just 'F' instead of the
intended 'F0'. Other than that, only whitespace changes.
 1.2 08-Aug-2021  rillig tests/lint: test passing of printf-like strings between lint1 and lint2
 1.1 07-Aug-2021  rillig tests/lint: test reading of 128-bit integer types and printf
 1.13 16-Dec-2021  rillig tests/lint: fix copy-and-paste typo in comment
 1.12 16-Dec-2021  rillig lint: improve error message for missing newline in .ln file
 1.11 16-Dec-2021  rillig tests/lint: demonstrate bad error message on missing newline
 1.10 28-Nov-2021  rillig lint2: in case of parse errors, output the offending line

This provides more of a clue than a simple '(not alnum or _: )',
especially in the output of build.sh.

While here, change the format of the error message to the standard
'%s:%d'. Since these are internal errors, they are not supposed to occur
often, so no need to change error(1).
 1.9 28-Nov-2021  rillig tests/lint2: fix regular expressions containing backslash

In regular expressions, a backslash must be doubled. In this case, ATF
didn't complain because the single backslashes were used in the pattern
'\($2\)', where they produced '\(...\\)'. Omitting the backslash for the
closing parenthesis was apparently OK; other regex implementations
complain about this.
 1.8 05-Sep-2021  rillig lint: hide irrelevant type information from lint2

No functional change.
 1.7 04-Sep-2021  rillig tests/lint: test error handling when reading .ln files
 1.6 24-Aug-2021  rillig lint: allow libraries to use 128-bit integer types
 1.5 08-Aug-2021  rillig tests/lint: include but don't run read_lp64 on 32-bit platforms

The lint1 tests are all in the machine-independent file list, which
makes it easier to manage them. At run time, some of them are skipped
based on platform characteristics. Do the same for the lint2 tests.

Having the lint2 test named read_lp64 as the only machine-dependent test
would complicate things.

The build for i386 had failed because the files for read_lp64 were
listed in distrib/sets/lists/tests/mi but were not actually installed.
 1.4 08-Aug-2021  rillig tests/lint: make list of tests simpler

Since the file /usr/tests/usr.bin/xlint/lint2/tests has only been in the
file set for a few minutes, it is not marked as obsolete but simply
removed.
 1.3 07-Aug-2021  rillig tests/lint: test reading of 128-bit integer types and printf
 1.2 07-Aug-2021  rillig tests/lint: add test for reading the lint1 output
 1.1 05-Aug-2021  rillig tests/lint: add test skeletons for messages from lint2
 1.1 15-Jan-2023  rillig tests/lint: add basic tests for lint (not lint1 or lint2)
 1.5 30-Nov-2024  rillig lint: reword lint2 warnings, reduce punctuation

The previous diagnostics used unusual punctuation, for example by placing
spaces inside parentheses, as well as using space-space-tab and
double-colon as separators. Convert these diagnostics into readily
readable prose, and mark them clearly as coming from lint2, so that they
can be related to the tests in /usr/tests/usr.bin/xlint/lint2/msg_???.ln.

This change means that usr.bin/error no longer recognizes these messages
as coming from lint2, but that can be fixed later if necessary.
 1.4 07-Sep-2023  rillig branches: 1.4.2;
tests/lint: allow lint libraries to be installed
 1.3 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.2 28-Jun-2023  rillig tests/lint: use standard form of ATF tests, test removing output file
 1.1 15-Jan-2023  rillig tests/lint: add basic tests for lint (not lint1 or lint2)
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.1 27-Jun-2020  jruoho Add a test case for PR kern/53767.
 1.1 27-Jun-2020  jruoho Add a test case for PR kern/53767.

RSS XML Feed