Module Name: src Committed By: rillig Date: Wed Jul 5 11:42:14 UTC 2023
Modified Files: src/tests/usr.bin/xlint/lint1: gen-platforms.sh msg_247_ilp32_ldbl64.c msg_247_lp64_ldbl128.c msg_247_portable.c platform_ldbl128.c platform_ldbl64.c platform_ldbl96.c t_integration.sh src/usr.bin/xlint/lint1: Makefile Log Message: tests/lint: spell platform identifiers for 'long double' consistently The test file names don't have a hyphen, so the identifiers shouldn't have one either. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/gen-platforms.sh \ src/tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c \ src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c \ src/tests/usr.bin/xlint/lint1/msg_247_portable.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/platform_ldbl128.c \ src/tests/usr.bin/xlint/lint1/platform_ldbl96.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/platform_ldbl64.c cvs rdiff -u -r1.81 -r1.82 src/tests/usr.bin/xlint/lint1/t_integration.sh cvs rdiff -u -r1.95 -r1.96 src/usr.bin/xlint/lint1/Makefile 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/gen-platforms.sh diff -u src/tests/usr.bin/xlint/lint1/gen-platforms.sh:1.1 src/tests/usr.bin/xlint/lint1/gen-platforms.sh:1.2 --- src/tests/usr.bin/xlint/lint1/gen-platforms.sh:1.1 Sun Oct 10 18:16:12 2021 +++ src/tests/usr.bin/xlint/lint1/gen-platforms.sh Wed Jul 5 11:42:14 2023 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: gen-platforms.sh,v 1.1 2021/10/10 18:16:12 rillig Exp $ +# $NetBSD: gen-platforms.sh,v 1.2 2023/07/05 11:42:14 rillig Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ for file in ../../../../usr.bin/xlint/ar char=$(sed -n -E 's,.*"([su]char)\.h".*,\1,p' "$file") ilp=$(sed -n -E 's,.*"(ilp32|lp64)\.h".*,\1,p' "$file") size=$(awk '/#.*LONG$/ { l = "long" } /#.*INT$/ { i = "int" } END { print(i "" l) }' "$file") - ldbl=$(sed -n -E 's,^#.*LDOUBLE[^0-9]+([0-9]+)$,ldbl-\1,p' "$file") + ldbl=$(sed -n -E 's,^#.*LDOUBLE[^0-9]+([0-9]+)$,ldbl\1,p' "$file") if [ "$size" != "int" ] && [ "$size" != "long" ]; then size="????" # mips Index: src/tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c diff -u src/tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c:1.1 src/tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c:1.1 Wed Jul 5 11:36:56 2023 +++ src/tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c Wed Jul 5 11:42:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_247_ilp32_ldbl64.c,v 1.1 2023/07/05 11:36:56 rillig Exp $ */ +/* $NetBSD: msg_247_ilp32_ldbl64.c,v 1.2 2023/07/05 11:42:14 rillig Exp $ */ # 3 "msg_247_ilp32.c" // Test for message: pointer cast from '%s' to '%s' may be troublesome [247] @@ -6,10 +6,10 @@ // In non-portable mode, lint warns based on the actual type sizes. // // See also: -// msg_247_lp64.c +// msg_247_lp64_ldbl128.c // msg_247_portable.c -/* lint1-only-if: ilp32 ldbl-64 */ +/* lint1-only-if: ilp32 ldbl64 */ /* lint1-extra-flags: -c -X 351 */ typedef double double_array[5]; Index: src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c diff -u src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c:1.1 src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c:1.1 Wed Jul 5 11:36:56 2023 +++ src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c Wed Jul 5 11:42:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_247_lp64_ldbl128.c,v 1.1 2023/07/05 11:36:56 rillig Exp $ */ +/* $NetBSD: msg_247_lp64_ldbl128.c,v 1.2 2023/07/05 11:42:14 rillig Exp $ */ # 3 "msg_247_lp64.c" // Test for message: pointer cast from '%s' to '%s' may be troublesome [247] @@ -6,10 +6,10 @@ // In non-portable mode, lint warns based on the actual type sizes. // // See also: -// msg_247_ilp32.c +// msg_247_ilp32_ldbl64.c // msg_247_portable.c -/* lint1-only-if: lp64 ldbl-128 */ +/* lint1-only-if: lp64 ldbl128 */ /* lint1-extra-flags: -c -X 351 */ typedef double double_array[5]; Index: src/tests/usr.bin/xlint/lint1/msg_247_portable.c diff -u src/tests/usr.bin/xlint/lint1/msg_247_portable.c:1.1 src/tests/usr.bin/xlint/lint1/msg_247_portable.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_247_portable.c:1.1 Wed Jul 5 11:36:56 2023 +++ src/tests/usr.bin/xlint/lint1/msg_247_portable.c Wed Jul 5 11:42:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_247_portable.c,v 1.1 2023/07/05 11:36:56 rillig Exp $ */ +/* $NetBSD: msg_247_portable.c,v 1.2 2023/07/05 11:42:14 rillig Exp $ */ # 3 "msg_247_portable.c" // Test for message: pointer cast from '%s' to '%s' may be troublesome [247] @@ -8,8 +8,8 @@ // Analogous for the floating point types and the complex types. // // See also: -// msg_247_ilp32.c -// msg_247_lp64.c +// msg_247_ilp32_ldbl64.c +// msg_247_lp64_ldbl128.c /* lint1-extra-flags: -c -p -X 351 */ Index: src/tests/usr.bin/xlint/lint1/platform_ldbl128.c diff -u src/tests/usr.bin/xlint/lint1/platform_ldbl128.c:1.5 src/tests/usr.bin/xlint/lint1/platform_ldbl128.c:1.6 --- src/tests/usr.bin/xlint/lint1/platform_ldbl128.c:1.5 Wed Apr 5 20:17:30 2023 +++ src/tests/usr.bin/xlint/lint1/platform_ldbl128.c Wed Jul 5 11:42:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: platform_ldbl128.c,v 1.5 2023/04/05 20:17:30 rillig Exp $ */ +/* $NetBSD: platform_ldbl128.c,v 1.6 2023/07/05 11:42:14 rillig Exp $ */ # 3 "platform_ldbl128.c" /* @@ -6,7 +6,7 @@ */ /* lint1-extra-flags: -c -h -a -p -b -r -z -X 351 */ -/* lint1-only-if: ldbl-128 */ +/* lint1-only-if: ldbl128 */ /* CONSTCOND */ typedef int bits_per_byte[((unsigned char)-1) == 255 ? 1 : -1]; Index: src/tests/usr.bin/xlint/lint1/platform_ldbl96.c diff -u src/tests/usr.bin/xlint/lint1/platform_ldbl96.c:1.5 src/tests/usr.bin/xlint/lint1/platform_ldbl96.c:1.6 --- src/tests/usr.bin/xlint/lint1/platform_ldbl96.c:1.5 Wed Apr 5 20:17:30 2023 +++ src/tests/usr.bin/xlint/lint1/platform_ldbl96.c Wed Jul 5 11:42:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: platform_ldbl96.c,v 1.5 2023/04/05 20:17:30 rillig Exp $ */ +/* $NetBSD: platform_ldbl96.c,v 1.6 2023/07/05 11:42:14 rillig Exp $ */ # 3 "platform_ldbl96.c" /* @@ -6,7 +6,7 @@ */ /* lint1-extra-flags: -c -h -a -p -b -r -z -X 351 */ -/* lint1-only-if: ldbl-96 */ +/* lint1-only-if: ldbl96 */ /* CONSTCOND */ typedef int bits_per_byte[((unsigned char)-1) == 255 ? 1 : -1]; Index: src/tests/usr.bin/xlint/lint1/platform_ldbl64.c diff -u src/tests/usr.bin/xlint/lint1/platform_ldbl64.c:1.4 src/tests/usr.bin/xlint/lint1/platform_ldbl64.c:1.5 --- src/tests/usr.bin/xlint/lint1/platform_ldbl64.c:1.4 Wed Apr 5 20:13:01 2023 +++ src/tests/usr.bin/xlint/lint1/platform_ldbl64.c Wed Jul 5 11:42:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: platform_ldbl64.c,v 1.4 2023/04/05 20:13:01 rillig Exp $ */ +/* $NetBSD: platform_ldbl64.c,v 1.5 2023/07/05 11:42:14 rillig Exp $ */ # 3 "platform_ldbl64.c" /* @@ -6,7 +6,7 @@ */ /* lint1-extra-flags: -c -h -a -p -b -r -z -X 351 */ -/* lint1-only-if: ldbl-64 */ +/* lint1-only-if: ldbl64 */ /* CONSTCOND */ typedef int bits_per_byte[((unsigned char)-1) == 255 ? 1 : -1]; Index: src/tests/usr.bin/xlint/lint1/t_integration.sh diff -u src/tests/usr.bin/xlint/lint1/t_integration.sh:1.81 src/tests/usr.bin/xlint/lint1/t_integration.sh:1.82 --- src/tests/usr.bin/xlint/lint1/t_integration.sh:1.81 Sat Jun 24 07:45:36 2023 +++ src/tests/usr.bin/xlint/lint1/t_integration.sh Wed Jul 5 11:42:14 2023 @@ -1,4 +1,4 @@ -# $NetBSD: t_integration.sh,v 1.81 2023/06/24 07:45:36 rillig Exp $ +# $NetBSD: t_integration.sh,v 1.82 2023/07/05 11:42:14 rillig Exp $ # # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,34 +37,34 @@ configure_test_case() awk=' BEGIN { # see ./gen-platforms.sh - platform["aarch64"] = "uchar lp64 long ldbl-128" - platform["alpha"] = "schar lp64 long ldbl-64" - platform["arm"] = "uchar ilp32 long ldbl-64" - platform["coldfire"] = "schar ilp32 int ldbl-64" - platform["hppa"] = "schar ilp32 long ldbl-64" - platform["i386"] = "schar ilp32 int ldbl-96" - platform["ia64"] = "schar lp64 long ldbl-128" - platform["m68000"] = "schar ilp32 int ldbl-64" - platform["m68k"] = "schar ilp32 int ldbl-96" - platform["mips"] = "schar ilp32 ???? ldbl-64" - platform["mips64"] = "schar ilp32 long ldbl-128" - platform["mipsn64"] = "schar lp64 long ldbl-128" - platform["or1k"] = "schar ilp32 int ldbl-64" - platform["powerpc"] = "uchar ilp32 int ldbl-64" - platform["powerpc64"] = "uchar lp64 long ldbl-64" - platform["riscv32"] = "schar ilp32 int ldbl-64" - platform["riscv64"] = "schar lp64 long ldbl-64" - platform["sh3"] = "schar ilp32 int ldbl-64" - platform["sparc"] = "schar ilp32 long ldbl-64" - platform["sparc64"] = "schar lp64 long ldbl-128" - platform["vax"] = "schar ilp32 long ldbl-64" - platform["x86_64"] = "schar lp64 long ldbl-128" + platform["aarch64"] = "uchar lp64 long ldbl128" + platform["alpha"] = "schar lp64 long ldbl64" + platform["arm"] = "uchar ilp32 long ldbl64" + platform["coldfire"] = "schar ilp32 int ldbl64" + platform["hppa"] = "schar ilp32 long ldbl64" + platform["i386"] = "schar ilp32 int ldbl96" + platform["ia64"] = "schar lp64 long ldbl128" + platform["m68000"] = "schar ilp32 int ldbl64" + platform["m68k"] = "schar ilp32 int ldbl96" + platform["mips"] = "schar ilp32 ???? ldbl64" + platform["mips64"] = "schar ilp32 long ldbl128" + platform["mipsn64"] = "schar lp64 long ldbl128" + platform["or1k"] = "schar ilp32 int ldbl64" + platform["powerpc"] = "uchar ilp32 int ldbl64" + platform["powerpc64"] = "uchar lp64 long ldbl64" + platform["riscv32"] = "schar ilp32 int ldbl64" + platform["riscv64"] = "schar lp64 long ldbl64" + platform["sh3"] = "schar ilp32 int ldbl64" + platform["sparc"] = "schar ilp32 long ldbl64" + platform["sparc64"] = "schar lp64 long ldbl128" + platform["vax"] = "schar ilp32 long ldbl64" + platform["x86_64"] = "schar lp64 long ldbl128" } function platform_has(prop) { if (platform[prop] != "") return prop == archsubdir - if (!match(prop, /^(schar|uchar|ilp32|lp64|int|long|ldbl-64|ldbl-96|ldbl-128)$/)) { + if (!match(prop, /^(schar|uchar|ilp32|lp64|int|long|ldbl64|ldbl96|ldbl128)$/)) { printf("bad property '\''%s'\''\n", prop) > "/dev/stderr" exit(1) } Index: src/usr.bin/xlint/lint1/Makefile diff -u src/usr.bin/xlint/lint1/Makefile:1.95 src/usr.bin/xlint/lint1/Makefile:1.96 --- src/usr.bin/xlint/lint1/Makefile:1.95 Tue Mar 28 14:44:35 2023 +++ src/usr.bin/xlint/lint1/Makefile Wed Jul 5 11:42:14 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.95 2023/03/28 14:44:35 rillig Exp $ +# $NetBSD: Makefile,v 1.96 2023/07/05 11:42:14 rillig Exp $ .include <bsd.own.mk> @@ -119,7 +119,7 @@ add-test: .PHONY '/* lint1-extra-flags: -Z */' \ '/* lint1-flags: -Z */' \ '/* lint1-only-if: schar uchar ilp32 lp64 int long */' \ - '/* lint1-skip-if: ldbl-64 ldbl-96 ldbl-128 */' \ + '/* lint1-skip-if: ldbl64 ldbl96 ldbl128 */' \ '' \ '// TODO: Add some code that passes.' \ '// TODO: Add some code that fails.' \