Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 lint: demonstrate wrong integer co...



details:   https://anonhg.NetBSD.org/src/rev/41ac8843c551
branches:  trunk
changeset: 1022668:41ac8843c551
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 01 13:45:14 2021 +0000

description:
lint: demonstrate wrong integer conversion for __uint128_t

diffstat:

 tests/usr.bin/xlint/lint1/expr_binary.c   |  8 +++++++-
 tests/usr.bin/xlint/lint1/expr_binary.exp |  2 ++
 2 files changed, 9 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 7eaf1664f732 -r 41ac8843c551 tests/usr.bin/xlint/lint1/expr_binary.c
--- a/tests/usr.bin/xlint/lint1/expr_binary.c   Sun Aug 01 13:31:48 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/expr_binary.c   Sun Aug 01 13:45:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expr_binary.c,v 1.1 2021/08/01 13:31:49 rillig Exp $   */
+/*     $NetBSD: expr_binary.c,v 1.2 2021/08/01 13:45:14 rillig Exp $   */
 # 3 "expr_binary.c"
 
 /*
@@ -44,4 +44,10 @@
 
        /* expect+1: '__int128_t' */
        sink((__int128_t)1 + 1);
+
+       /* expect+1: 'unsigned int' *//* FIXME */
+       sink((__uint128_t)1 + (__int128_t)1);
+
+       /* expect+1: 'unsigned int' *//* FIXME */
+       sink((__int128_t)1 + (__uint128_t)1);
 }
diff -r 7eaf1664f732 -r 41ac8843c551 tests/usr.bin/xlint/lint1/expr_binary.exp
--- a/tests/usr.bin/xlint/lint1/expr_binary.exp Sun Aug 01 13:31:48 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/expr_binary.exp Sun Aug 01 13:45:14 2021 +0000
@@ -7,3 +7,5 @@
 expr_binary.c(40): warning: passing 'float' to incompatible 'struct incompatible', arg #1 [155]
 expr_binary.c(43): warning: passing '__uint128_t' to incompatible 'struct incompatible', arg #1 [155]
 expr_binary.c(46): warning: passing '__int128_t' to incompatible 'struct incompatible', arg #1 [155]
+expr_binary.c(49): warning: passing 'unsigned int' to incompatible 'struct incompatible', arg #1 [155]
+expr_binary.c(52): warning: passing 'unsigned int' to incompatible 'struct incompatible', arg #1 [155]



Home | Main Index | Thread Index | Old Index