Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
tests/lint: remove .exp files, as they have become redundant Now that each lint1 test lists all generated diagnostics as 'expect' comments, the information from the .exp files is no longer needed. The only information that gets lost is the order of the diagnostics, which is mostly relevant for paired messages like 'inconsistent definition' + 'previous definition was here'.
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.
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.
lint: prefix error messages with 'error:' This makes it easier to find these errors in the build logs.
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.
lint: change spelling of initialisation to initialization That's the wording from the ISO C99 standard.
lint: add type information to message about enum mismatch
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.
lint: document purpose of the test d_struct_init_nested
lint1: add expected output for test d_struct_init_nested