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 tests/lint: re-add the test for __...



details:   https://anonhg.NetBSD.org/src/rev/24cc05f6a8da
branches:  trunk
changeset: 1022672:24cc05f6a8da
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 01 14:51:41 2021 +0000

description:
tests/lint: re-add the test for __uint128_t

diffstat:

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

diffs (32 lines):

diff -r 8018e20f18f8 -r 24cc05f6a8da tests/usr.bin/xlint/lint1/expr_binary.c
--- a/tests/usr.bin/xlint/lint1/expr_binary.c   Sun Aug 01 14:45:39 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/expr_binary.c   Sun Aug 01 14:51:41 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expr_binary.c,v 1.4 2021/08/01 14:42:21 rillig Exp $   */
+/*     $NetBSD: expr_binary.c,v 1.5 2021/08/01 14:51:41 rillig Exp $   */
 # 3 "expr_binary.c"
 
 /*
@@ -117,4 +117,13 @@
        sink(0UL + 0LL);
        /* expect+1: 'unsigned long long' */
        sink(0LL + 0UL);
+
+       /*
+        * Ensure that __int128_t is listed in the integer ranks.  This table
+        * only becomes relevant when both operands have the same width.
+        */
+       /* expect+1: '__uint128_t' */
+       sink((__uint128_t)1 + (__int128_t)1);
+       /* expect+1: '__uint128_t' */
+       sink((__int128_t)1 + (__uint128_t)1);
 }
diff -r 8018e20f18f8 -r 24cc05f6a8da tests/usr.bin/xlint/lint1/expr_binary.exp
--- a/tests/usr.bin/xlint/lint1/expr_binary.exp Sun Aug 01 14:45:39 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/expr_binary.exp Sun Aug 01 14:51:41 2021 +0000
@@ -35,3 +35,5 @@
 expr_binary.c(113): warning: passing 'unsigned long long' to incompatible 'struct incompatible', arg #1 [155]
 expr_binary.c(117): warning: passing 'unsigned long long' to incompatible 'struct incompatible', arg #1 [155]
 expr_binary.c(119): warning: passing 'unsigned long long' to incompatible 'struct incompatible', arg #1 [155]
+expr_binary.c(126): warning: passing '__uint128_t' to incompatible 'struct incompatible', arg #1 [155]
+expr_binary.c(128): warning: passing '__uint128_t' to incompatible 'struct incompatible', arg #1 [155]



Home | Main Index | Thread Index | Old Index