Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/lint1 tests/lint: spell platform identifiers f...



details:   https://anonhg.NetBSD.org/src/rev/242d77d14e74
branches:  trunk
changeset: 377282:242d77d14e74
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Jul 05 11:42:14 2023 +0000

description:
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.

diffstat:

 tests/usr.bin/xlint/lint1/gen-platforms.sh       |   4 +-
 tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c |   6 +-
 tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c |   6 +-
 tests/usr.bin/xlint/lint1/msg_247_portable.c     |   6 +-
 tests/usr.bin/xlint/lint1/platform_ldbl128.c     |   4 +-
 tests/usr.bin/xlint/lint1/platform_ldbl64.c      |   4 +-
 tests/usr.bin/xlint/lint1/platform_ldbl96.c      |   4 +-
 tests/usr.bin/xlint/lint1/t_integration.sh       |  48 ++++++++++++------------
 usr.bin/xlint/lint1/Makefile                     |   4 +-
 9 files changed, 43 insertions(+), 43 deletions(-)

diffs (222 lines):

diff -r df394842a5cd -r 242d77d14e74 tests/usr.bin/xlint/lint1/gen-platforms.sh
--- a/tests/usr.bin/xlint/lint1/gen-platforms.sh        Wed Jul 05 11:36:56 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/gen-platforms.sh        Wed Jul 05 11:42:14 2023 +0000
@@ -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
diff -r df394842a5cd -r 242d77d14e74 tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c
--- a/tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c  Wed Jul 05 11:36:56 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_247_ilp32_ldbl64.c  Wed Jul 05 11:42:14 2023 +0000
@@ -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];
diff -r df394842a5cd -r 242d77d14e74 tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c
--- a/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c  Wed Jul 05 11:36:56 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c  Wed Jul 05 11:42:14 2023 +0000
@@ -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];
diff -r df394842a5cd -r 242d77d14e74 tests/usr.bin/xlint/lint1/msg_247_portable.c
--- a/tests/usr.bin/xlint/lint1/msg_247_portable.c      Wed Jul 05 11:36:56 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_247_portable.c      Wed Jul 05 11:42:14 2023 +0000
@@ -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 */
 
diff -r df394842a5cd -r 242d77d14e74 tests/usr.bin/xlint/lint1/platform_ldbl128.c
--- a/tests/usr.bin/xlint/lint1/platform_ldbl128.c      Wed Jul 05 11:36:56 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/platform_ldbl128.c      Wed Jul 05 11:42:14 2023 +0000
@@ -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];
diff -r df394842a5cd -r 242d77d14e74 tests/usr.bin/xlint/lint1/platform_ldbl64.c
--- a/tests/usr.bin/xlint/lint1/platform_ldbl64.c       Wed Jul 05 11:36:56 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/platform_ldbl64.c       Wed Jul 05 11:42:14 2023 +0000
@@ -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];
diff -r df394842a5cd -r 242d77d14e74 tests/usr.bin/xlint/lint1/platform_ldbl96.c
--- a/tests/usr.bin/xlint/lint1/platform_ldbl96.c       Wed Jul 05 11:36:56 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/platform_ldbl96.c       Wed Jul 05 11:42:14 2023 +0000
@@ -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];
diff -r df394842a5cd -r 242d77d14e74 tests/usr.bin/xlint/lint1/t_integration.sh
--- a/tests/usr.bin/xlint/lint1/t_integration.sh        Wed Jul 05 11:36:56 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/t_integration.sh        Wed Jul 05 11:42:14 2023 +0000
@@ -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)
                        }
diff -r df394842a5cd -r 242d77d14e74 usr.bin/xlint/lint1/Makefile
--- a/usr.bin/xlint/lint1/Makefile      Wed Jul 05 11:36:56 2023 +0000
+++ b/usr.bin/xlint/lint1/Makefile      Wed Jul 05 11:42:14 2023 +0000
@@ -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.' \



Home | Main Index | Thread Index | Old Index