Module Name: src Committed By: rillig Date: Sat Jul 8 12:42:11 UTC 2023
Modified Files: src/tests/usr.bin/xlint/lint1: platform_lp64.c Log Message: tests/lint: demonstrate missing warning for converting int128_t To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/platform_lp64.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/lint1/platform_lp64.c diff -u src/tests/usr.bin/xlint/lint1/platform_lp64.c:1.5 src/tests/usr.bin/xlint/lint1/platform_lp64.c:1.6 --- src/tests/usr.bin/xlint/lint1/platform_lp64.c:1.5 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/platform_lp64.c Sat Jul 8 12:42:11 2023 @@ -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 /* 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; +}