The NetBSD Project

CVS log for src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c

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

Request diff between arbitrary revisions

Default branch: MAIN

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jul 9 10:42:07 2023 UTC (7 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

lint: remove redundant '#' after 'argument' in diagnostics

Revision 1.9 / (download) - annotate - [select for diffs], Tue Mar 28 14:44:35 2023 UTC (11 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

lint: warn about extern declarations outside headers

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 17 18:54:53 2022 UTC (20 months, 2 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

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

Revision 1.7 / (download) - annotate - [select for diffs], Sat Apr 16 18:41:21 2022 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

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.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Apr 15 21:50:07 2022 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

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

	-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.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Sep 2 17:55:27 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.4: +15 -13 lines
Diff to previous 1.4 (colored)

lint: align tests for message 259, clarify its purpose

Revision 1.4 / (download) - annotate - [select for diffs], Tue Aug 31 19:26:23 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.3: +6 -1 lines
Diff to previous 1.3 (colored)

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.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Aug 21 11:50:57 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

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.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 29 13:58:13 2021 UTC (2 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

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
mostly have char == signed char as well.

However, lint behaves differently on platforms with char == unsigned
char.  On these platforms, a simple "char ch = '\xff'" leads to the
bogus warning that "conversion of 'int' to 'char' is out of range".

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jun 29 09:19:17 2021 UTC (2 years, 8 months ago) by rillig
Branch: MAIN

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.

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

CVSweb <>