CVS log for src/tests/usr.bin/xlint/lint1/expr_fold.c
Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Jun 8 06:37:06 2024 UTC (6 months ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
HEAD
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +8 -8
lines
lint: add details to warnings about negative constant to unsigned
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Mar 10 19:45:14 2024 UTC (9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +13 -13
lines
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.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Mar 10 14:32:30 2024 UTC (9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -3
lines
lint: detect more cases of integer overflow in constant expressions
For unsigned integers, detect when 'a + b' wraps around.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Mar 10 10:31:29 2024 UTC (9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -2
lines
lint: remove wrong warning about overflow in unary '-' for unsigned
Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Mar 9 23:55:11 2024 UTC (9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -4
lines
lint: fix excessive overflow warning after division by zero
Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Jan 6 15:05:24 2024 UTC (11 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +1 -3
lines
lint: remove redundant parentheses, braces and comments
Rename the functions for folding constant expressions, to make the
comments redundant.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Jul 9 11:01:27 2023 UTC (17 months ago) by rillig
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +16 -16
lines
lint: clean up the wording of a few diagnostics
Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Jul 2 18:14:44 2023 UTC (17 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2
lines
lint: rename 'quad' to 'signed int' or 'unsigned int'
No functional change.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Mar 28 14:44:34 2023 UTC (20 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2
lines
lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Apr 19 23:16:14 2022 UTC (2 years, 7 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +14 -1
lines
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 - view: text, markup, annotated - select for diffs
Fri Apr 15 21:50:07 2022 UTC (2 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -24
lines
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 - view: text, markup, annotated - select for diffs
Mon Aug 23 06:50:01 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +15 -15
lines
lint: add quotes around placeholder in message 141
Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Aug 22 21:17:04 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +7 -3
lines
lint: fix folding of comparisons in constant expressions
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Aug 22 20:14:24 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +20 -1
lines
tests/lint: demonstrate wrong folding of 64-bit numbers
Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Aug 19 20:48:47 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3
lines
lint: fix wrong integer overflow warning for unsigned types
Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Aug 19 20:32:33 2021 UTC (3 years, 3 months ago) by rillig
Branches: 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.
CVSweb <webmaster@jp.NetBSD.org>