diff options
| author | rillig <rillig@NetBSD.org> | 2023-07-08 12:42:11 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2023-07-08 12:42:11 +0000 |
| commit | 6a7c93db9c735d01657a9d87d1273906b2323404 (patch) | |
| tree | b0786a3f0d0fbd92e7e0d3f02f90d9c99bf03f98 | |
| parent | c8d1c1b1b539f64aceb2773449908eff62ba034d (diff) | |
tests/lint: demonstrate missing warning for converting int128_t
| -rw-r--r-- | tests/usr.bin/xlint/lint1/platform_lp64.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/usr.bin/xlint/lint1/platform_lp64.c b/tests/usr.bin/xlint/lint1/platform_lp64.c index 17639ae4629..6b981f83e00 100644 --- a/tests/usr.bin/xlint/lint1/platform_lp64.c +++ b/tests/usr.bin/xlint/lint1/platform_lp64.c @@ -1,4 +1,4 @@ -/* $NetBSD: platform_lp64.c,v 1.5 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: platform_lp64.c,v 1.6 2023/07/08 12:42:11 rillig Exp $ */ # 3 "platform_lp64.c" /* @@ -13,6 +13,8 @@ int s32; unsigned int u32; long sl32; unsigned long ul32; +__int128_t s128; +__uint128_t u128; void convert_between_int_and_long(void) @@ -33,3 +35,11 @@ convert_unsigned_char_to_size_t(unsigned char uc) /* no warning, unlike platform_int */ to_size_t(uc); } + +void +convert_128(void) +{ + /* TODO: Warn about 128-bit types as well. */ + s32 = s128; + u32 = u128; +} |
