History log of /netbsd-src/tests/usr.bin/xlint/lint1/expr_fold.c (Results 1 – 16 of 16)
Revision Date Author Comments
# 98412b50 08-Jun-2024 rillig <rillig@NetBSD.org>

lint: add details to warnings about negative constant to unsigned


# dd848dec 10-Mar-2024 rillig <rillig@NetBSD.org>

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.


# 51858eeb 10-Mar-2024 rillig <rillig@NetBSD.org>

lint: detect more cases of integer overflow in constant expressions

For unsigned integers, detect when 'a + b' wraps around.


# 25f6e585 10-Mar-2024 rillig <rillig@NetBSD.org>

lint: remove wrong warning about overflow in unary '-' for unsigned


# 3e856647 09-Mar-2024 rillig <rillig@NetBSD.org>

lint: fix excessive overflow warning after division by zero


# 08e0319c 06-Jan-2024 rillig <rillig@NetBSD.org>

lint: remove redundant parentheses, braces and comments

Rename the functions for folding constant expressions, to make the
comments redundant.


# a194378b 09-Jul-2023 rillig <rillig@NetBSD.org>

lint: clean up the wording of a few diagnostics


# ad4700f6 02-Jul-2023 rillig <rillig@NetBSD.org>

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# b2baa501 28-Mar-2023 rillig <rillig@NetBSD.org>

lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html


# 598b5fa3 19-Apr-2022 rillig <rillig@NetBSD.org>

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.


# 59915d96 15-Apr-2022 rillig <rillig@NetBSD.org>

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
t

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.

show more ...


# d0949d37 23-Aug-2021 rillig <rillig@NetBSD.org>

lint: add quotes around placeholder in message 141


# a8096716 22-Aug-2021 rillig <rillig@NetBSD.org>

lint: fix folding of comparisons in constant expressions


# 54836453 22-Aug-2021 rillig <rillig@NetBSD.org>

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


# 2de04c81 19-Aug-2021 rillig <rillig@NetBSD.org>

lint: fix wrong integer overflow warning for unsigned types


# 59e08a43 19-Aug-2021 rillig <rillig@NetBSD.org>

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 '

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.

show more ...