Module Name: src
Committed By: rillig
Date: Sun Jan 24 14:47:43 UTC 2021
Modified Files:
src/usr.bin/xlint/arch/aarch64: targparam.h
src/usr.bin/xlint/arch/alpha: targparam.h
src/usr.bin/xlint/arch/arm: targparam.h
src/usr.bin/xlint/arch/coldfire: targparam.h
src/usr.bin/xlint/arch/hppa: targparam.h
src/usr.bin/xlint/arch/i386: targparam.h
src/usr.bin/xlint/arch/ia64: targparam.h
src/usr.bin/xlint/arch/m68000: targparam.h
src/usr.bin/xlint/arch/m68k: targparam.h
src/usr.bin/xlint/arch/mips: targparam.h
src/usr.bin/xlint/arch/mips64: targparam.h
src/usr.bin/xlint/arch/or1k: targparam.h
src/usr.bin/xlint/arch/powerpc: targparam.h
src/usr.bin/xlint/arch/powerpc64: targparam.h
src/usr.bin/xlint/arch/riscv32: targparam.h
src/usr.bin/xlint/arch/riscv64: targparam.h
src/usr.bin/xlint/arch/sh3: targparam.h
src/usr.bin/xlint/arch/sparc: targparam.h
src/usr.bin/xlint/arch/sparc64: targparam.h
src/usr.bin/xlint/arch/vax: targparam.h
src/usr.bin/xlint/arch/x86_64: targparam.h
src/usr.bin/xlint/common: inittyp.c
src/usr.bin/xlint/lint1: tree.c
Log Message:
lint: reduce preprocessor magic for platform target types
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/xlint/arch/aarch64/targparam.h
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/arch/alpha/targparam.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/arch/arm/targparam.h
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/arch/coldfire/targparam.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/arch/hppa/targparam.h
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/arch/i386/targparam.h
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/arch/ia64/targparam.h
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/arch/m68000/targparam.h
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/arch/m68k/targparam.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/arch/mips/targparam.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/arch/mips64/targparam.h
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/xlint/arch/or1k/targparam.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/arch/powerpc/targparam.h
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/arch/powerpc64/targparam.h
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/xlint/arch/riscv32/targparam.h
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/xlint/arch/riscv64/targparam.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/arch/sh3/targparam.h
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/arch/sparc/targparam.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/arch/sparc64/targparam.h
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/xlint/arch/vax/targparam.h
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/arch/x86_64/targparam.h
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/xlint/common/inittyp.c
cvs rdiff -u -r1.190 -r1.191 src/usr.bin/xlint/lint1/tree.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/arch/aarch64/targparam.h
diff -u src/usr.bin/xlint/arch/aarch64/targparam.h:1.3 src/usr.bin/xlint/arch/aarch64/targparam.h:1.4
--- src/usr.bin/xlint/arch/aarch64/targparam.h:1.3 Sat Jan 9 14:10:12 2021
+++ src/usr.bin/xlint/arch/aarch64/targparam.h Sun Jan 24 14:47:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.3 2021/01/09 14:10:12 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.4 2021/01/24 14:47:40 rillig Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -41,9 +41,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/alpha/targparam.h
diff -u src/usr.bin/xlint/arch/alpha/targparam.h:1.6 src/usr.bin/xlint/arch/alpha/targparam.h:1.7
--- src/usr.bin/xlint/arch/alpha/targparam.h:1.6 Sat Jan 9 14:10:12 2021
+++ src/usr.bin/xlint/arch/alpha/targparam.h Sun Jan 24 14:47:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.6 2021/01/09 14:10:12 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.7 2021/01/24 14:47:40 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/arm/targparam.h
diff -u src/usr.bin/xlint/arch/arm/targparam.h:1.7 src/usr.bin/xlint/arch/arm/targparam.h:1.8
--- src/usr.bin/xlint/arch/arm/targparam.h:1.7 Sat Jan 9 14:10:12 2021
+++ src/usr.bin/xlint/arch/arm/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.7 2021/01/09 14:10:12 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.8 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/coldfire/targparam.h
diff -u src/usr.bin/xlint/arch/coldfire/targparam.h:1.4 src/usr.bin/xlint/arch/coldfire/targparam.h:1.5
--- src/usr.bin/xlint/arch/coldfire/targparam.h:1.4 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/coldfire/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.4 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.5 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/hppa/targparam.h
diff -u src/usr.bin/xlint/arch/hppa/targparam.h:1.7 src/usr.bin/xlint/arch/hppa/targparam.h:1.8
--- src/usr.bin/xlint/arch/hppa/targparam.h:1.7 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/hppa/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.7 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.8 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/i386/targparam.h
diff -u src/usr.bin/xlint/arch/i386/targparam.h:1.6 src/usr.bin/xlint/arch/i386/targparam.h:1.7
--- src/usr.bin/xlint/arch/i386/targparam.h:1.6 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/i386/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.6 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.7 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/ia64/targparam.h
diff -u src/usr.bin/xlint/arch/ia64/targparam.h:1.4 src/usr.bin/xlint/arch/ia64/targparam.h:1.5
--- src/usr.bin/xlint/arch/ia64/targparam.h:1.4 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/ia64/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.4 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.5 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/m68000/targparam.h
diff -u src/usr.bin/xlint/arch/m68000/targparam.h:1.5 src/usr.bin/xlint/arch/m68000/targparam.h:1.6
--- src/usr.bin/xlint/arch/m68000/targparam.h:1.5 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/m68000/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.5 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.6 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/m68k/targparam.h
diff -u src/usr.bin/xlint/arch/m68k/targparam.h:1.6 src/usr.bin/xlint/arch/m68k/targparam.h:1.7
--- src/usr.bin/xlint/arch/m68k/targparam.h:1.6 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/m68k/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.6 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.7 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/mips/targparam.h
diff -u src/usr.bin/xlint/arch/mips/targparam.h:1.7 src/usr.bin/xlint/arch/mips/targparam.h:1.8
--- src/usr.bin/xlint/arch/mips/targparam.h:1.7 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/mips/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.7 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.8 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -44,13 +44,13 @@
*/
#ifdef _LP64_X
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#else
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#endif
#define FLOAT_SIZE 32
Index: src/usr.bin/xlint/arch/mips64/targparam.h
diff -u src/usr.bin/xlint/arch/mips64/targparam.h:1.7 src/usr.bin/xlint/arch/mips64/targparam.h:1.8
--- src/usr.bin/xlint/arch/mips64/targparam.h:1.7 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/mips64/targparam.h Sun Jan 24 14:47:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.7 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.8 2021/01/24 14:47:41 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -44,9 +44,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/or1k/targparam.h
diff -u src/usr.bin/xlint/arch/or1k/targparam.h:1.3 src/usr.bin/xlint/arch/or1k/targparam.h:1.4
--- src/usr.bin/xlint/arch/or1k/targparam.h:1.3 Sat Jan 9 14:10:13 2021
+++ src/usr.bin/xlint/arch/or1k/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.3 2021/01/09 14:10:13 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.4 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/powerpc/targparam.h
diff -u src/usr.bin/xlint/arch/powerpc/targparam.h:1.7 src/usr.bin/xlint/arch/powerpc/targparam.h:1.8
--- src/usr.bin/xlint/arch/powerpc/targparam.h:1.7 Sat Jan 9 14:10:14 2021
+++ src/usr.bin/xlint/arch/powerpc/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.7 2021/01/09 14:10:14 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.8 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/powerpc64/targparam.h
diff -u src/usr.bin/xlint/arch/powerpc64/targparam.h:1.4 src/usr.bin/xlint/arch/powerpc64/targparam.h:1.5
--- src/usr.bin/xlint/arch/powerpc64/targparam.h:1.4 Sat Jan 9 14:10:14 2021
+++ src/usr.bin/xlint/arch/powerpc64/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.4 2021/01/09 14:10:14 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.5 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/riscv32/targparam.h
diff -u src/usr.bin/xlint/arch/riscv32/targparam.h:1.3 src/usr.bin/xlint/arch/riscv32/targparam.h:1.4
--- src/usr.bin/xlint/arch/riscv32/targparam.h:1.3 Sat Jan 9 14:10:14 2021
+++ src/usr.bin/xlint/arch/riscv32/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.3 2021/01/09 14:10:14 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.4 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/riscv64/targparam.h
diff -u src/usr.bin/xlint/arch/riscv64/targparam.h:1.3 src/usr.bin/xlint/arch/riscv64/targparam.h:1.4
--- src/usr.bin/xlint/arch/riscv64/targparam.h:1.3 Sat Jan 9 14:10:14 2021
+++ src/usr.bin/xlint/arch/riscv64/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.3 2021/01/09 14:10:14 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.4 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/sh3/targparam.h
diff -u src/usr.bin/xlint/arch/sh3/targparam.h:1.7 src/usr.bin/xlint/arch/sh3/targparam.h:1.8
--- src/usr.bin/xlint/arch/sh3/targparam.h:1.7 Sat Jan 9 14:10:14 2021
+++ src/usr.bin/xlint/arch/sh3/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.7 2021/01/09 14:10:14 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.8 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 0
-#define SIZEOF_IS_ULONG 0
-#define INTPTR_IS_LONG 0
+#define PTRDIFF_TSPEC INT
+#define SIZEOF_TSPEC UINT
+#define INTPTR_TSPEC INT
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/sparc/targparam.h
diff -u src/usr.bin/xlint/arch/sparc/targparam.h:1.6 src/usr.bin/xlint/arch/sparc/targparam.h:1.7
--- src/usr.bin/xlint/arch/sparc/targparam.h:1.6 Sat Jan 9 14:10:14 2021
+++ src/usr.bin/xlint/arch/sparc/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.6 2021/01/09 14:10:14 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.7 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/sparc64/targparam.h
diff -u src/usr.bin/xlint/arch/sparc64/targparam.h:1.7 src/usr.bin/xlint/arch/sparc64/targparam.h:1.8
--- src/usr.bin/xlint/arch/sparc64/targparam.h:1.7 Sat Jan 9 14:10:14 2021
+++ src/usr.bin/xlint/arch/sparc64/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.7 2021/01/09 14:10:14 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.8 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/vax/targparam.h
diff -u src/usr.bin/xlint/arch/vax/targparam.h:1.8 src/usr.bin/xlint/arch/vax/targparam.h:1.9
--- src/usr.bin/xlint/arch/vax/targparam.h:1.8 Sat Jan 9 14:10:15 2021
+++ src/usr.bin/xlint/arch/vax/targparam.h Sun Jan 24 14:47:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.8 2021/01/09 14:10:15 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.9 2021/01/24 14:47:42 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -42,9 +42,9 @@
* or the value of sizeof is of type unsigned long. Note this MUST be
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/arch/x86_64/targparam.h
diff -u src/usr.bin/xlint/arch/x86_64/targparam.h:1.6 src/usr.bin/xlint/arch/x86_64/targparam.h:1.7
--- src/usr.bin/xlint/arch/x86_64/targparam.h:1.6 Sat Jan 9 14:10:15 2021
+++ src/usr.bin/xlint/arch/x86_64/targparam.h Sun Jan 24 14:47:43 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.6 2021/01/09 14:10:15 rillig Exp $ */
+/* $NetBSD: targparam.h,v 1.7 2021/01/24 14:47:43 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -43,9 +43,9 @@
* kept in sync with the compiler!
*/
-#define PTRDIFF_IS_LONG 1
-#define SIZEOF_IS_ULONG 1
-#define INTPTR_IS_LONG 1
+#define PTRDIFF_TSPEC LONG
+#define SIZEOF_TSPEC ULONG
+#define INTPTR_TSPEC LONG
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
Index: src/usr.bin/xlint/common/inittyp.c
diff -u src/usr.bin/xlint/common/inittyp.c:1.17 src/usr.bin/xlint/common/inittyp.c:1.18
--- src/usr.bin/xlint/common/inittyp.c:1.17 Sun Jan 17 13:50:32 2021
+++ src/usr.bin/xlint/common/inittyp.c Sun Jan 24 14:47:43 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: inittyp.c,v 1.17 2021/01/17 13:50:32 rillig Exp $ */
+/* $NetBSD: inittyp.c,v 1.18 2021/01/24 14:47:43 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: inittyp.c,v 1.17 2021/01/17 13:50:32 rillig Exp $");
+__RCSID("$NetBSD: inittyp.c,v 1.18 2021/01/24 14:47:43 rillig Exp $");
#endif
#include <limits.h>
@@ -48,11 +48,7 @@ __RCSID("$NetBSD: inittyp.c,v 1.17 2021/
/* various type information */
ttab_t ttab[NTSPEC];
-#if INTPTR_IS_LONG
-#define INT_RSIZE 3
-#else
-#define INT_RSIZE 4
-#endif
+#define INT_RSIZE (INTPTR_TSPEC == LONG ? 3 : 4)
void
inittyp(void)
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.190 src/usr.bin/xlint/lint1/tree.c:1.191
--- src/usr.bin/xlint/lint1/tree.c:1.190 Sun Jan 24 11:34:01 2021
+++ src/usr.bin/xlint/lint1/tree.c Sun Jan 24 14:47:43 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.190 2021/01/24 11:34:01 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.191 2021/01/24 14:47:43 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.190 2021/01/24 11:34:01 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.191 2021/01/24 14:47:43 rillig Exp $");
#endif
#include <float.h>
@@ -2659,13 +2659,8 @@ build_struct_access(op_t op, tnode_t *ln
ln = convert(NOOP, 0, tincref(gettyp(VOID), PTR), ln);
}
-#if PTRDIFF_IS_LONG
- ctn = new_integer_constant_node(LONG,
+ ctn = new_integer_constant_node(PTRDIFF_TSPEC,
rn->tn_sym->s_value.v_quad / CHAR_SIZE);
-#else
- ctn = new_integer_constant_node(INT,
- rn->tn_sym->s_value.v_quad / CHAR_SIZE);
-#endif
ntn = new_tnode(PLUS, tincref(rn->tn_type, PTR), ln, ctn);
if (ln->tn_op == CON)
@@ -2792,11 +2787,7 @@ build_plus_minus(op_t op, tnode_t *ln, t
lint_assert(ln->tn_type->t_tspec == PTR);
lint_assert(op == MINUS);
-#if PTRDIFF_IS_LONG
- tp = gettyp(LONG);
-#else
- tp = gettyp(INT);
-#endif
+ tp = gettyp(PTRDIFF_TSPEC);
ntn = new_tnode(op, tp, ln, rn);
if (ln->tn_op == CON && rn->tn_op == CON)
ntn = fold(ntn);
@@ -2839,11 +2830,7 @@ build_colon(tnode_t *ln, tnode_t *rn)
lt = ln->tn_type->t_tspec;
rt = rn->tn_type->t_tspec;
-#if PTRDIFF_IS_LONG
- pdt = LONG;
-#else
- pdt = INT;
-#endif
+ pdt = PTRDIFF_TSPEC;
/*
* Arithmetic types are balanced, all other type combinations
@@ -2971,7 +2958,6 @@ static tnode_t *
plength(type_t *tp)
{
int elem, elsz;
- tspec_t st;
lint_assert(tp->t_tspec == PTR);
tp = tp->t_subt;
@@ -3023,13 +3009,8 @@ plength(type_t *tp)
if (elsz == 0)
elsz = CHAR_SIZE;
-#if PTRDIFF_IS_LONG
- st = LONG;
-#else
- st = INT;
-#endif
-
- return new_integer_constant_node(st, (int64_t)(elem * elsz / CHAR_SIZE));
+ return new_integer_constant_node(PTRDIFF_TSPEC,
+ (int64_t)(elem * elsz / CHAR_SIZE));
}
/*
@@ -3324,13 +3305,7 @@ fold_float(tnode_t *tn)
tnode_t *
build_sizeof(type_t *tp)
{
- tspec_t st;
-#if SIZEOF_IS_ULONG
- st = ULONG;
-#else
- st = UINT;
-#endif
- return new_integer_constant_node(st, tsize(tp) / CHAR_SIZE);
+ return new_integer_constant_node(SIZEOF_TSPEC, tsize(tp) / CHAR_SIZE);
}
/*
@@ -3339,19 +3314,13 @@ build_sizeof(type_t *tp)
tnode_t *
build_offsetof(type_t *tp, sym_t *sym)
{
- tspec_t st;
-#if SIZEOF_IS_ULONG
- st = ULONG;
-#else
- st = UINT;
-#endif
tspec_t t = tp->t_tspec;
if (t != STRUCT && t != UNION)
/* unacceptable operand of '%s' */
error(111, "offsetof");
// XXX: wrong size, no checking for sym fixme
- return new_integer_constant_node(st, tsize(tp) / CHAR_SIZE);
+ return new_integer_constant_node(SIZEOF_TSPEC, tsize(tp) / CHAR_SIZE);
}
int64_t
@@ -3419,8 +3388,6 @@ tsize(type_t *tp)
tnode_t *
build_alignof(type_t *tp)
{
- tspec_t st;
-
switch (tp->t_tspec) {
case ARRAY:
break;
@@ -3454,13 +3421,8 @@ build_alignof(type_t *tp)
break;
}
-#if SIZEOF_IS_ULONG
- st = ULONG;
-#else
- st = UINT;
-#endif
-
- return new_integer_constant_node(st, (int64_t)getbound(tp) / CHAR_SIZE);
+ return new_integer_constant_node(SIZEOF_TSPEC,
+ (int64_t)getbound(tp) / CHAR_SIZE);
}
/*