The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.7 / (download) - annotate - [select for diffs], Tue Apr 19 23:16:14 2022 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.6: +14 -1 lines
Diff to previous 1.6 (colored)

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.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Apr 15 21:50:07 2022 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +3 -24 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
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.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Aug 23 06:50:01 2021 UTC (17 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.4: +15 -15 lines
Diff to previous 1.4 (colored)

lint: add quotes around placeholder in message 141

Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 22 21:17:04 2021 UTC (17 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.3: +7 -3 lines
Diff to previous 1.3 (colored)

lint: fix folding of comparisons in constant expressions

Revision 1.3 / (download) - annotate - [select for diffs], Sun Aug 22 20:14:24 2021 UTC (17 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.2: +20 -1 lines
Diff to previous 1.2 (colored)

tests/lint: demonstrate wrong folding of 64-bit numbers

Revision 1.2 / (download) - annotate - [select for diffs], Thu Aug 19 20:48:47 2021 UTC (17 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

lint: fix wrong integer overflow warning for unsigned types

Revision 1.1 / (download) - annotate - [select for diffs], Thu Aug 19 20:32:33 2021 UTC (17 months, 2 weeks ago) by rillig
Branch: MAIN

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.

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 <webmaster@jp.NetBSD.org>