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 lint: reduce preprocessor magic for plat...



details:   https://anonhg.NetBSD.org/src/rev/0b0dff519ca7
branches:  trunk
changeset: 950300:0b0dff519ca7
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 24 14:47:40 2021 +0000

description:
lint: reduce preprocessor magic for platform target types

diffstat:

 usr.bin/xlint/arch/aarch64/targparam.h   |   8 ++--
 usr.bin/xlint/arch/alpha/targparam.h     |   8 ++--
 usr.bin/xlint/arch/arm/targparam.h       |   8 ++--
 usr.bin/xlint/arch/coldfire/targparam.h  |   8 ++--
 usr.bin/xlint/arch/hppa/targparam.h      |   8 ++--
 usr.bin/xlint/arch/i386/targparam.h      |   8 ++--
 usr.bin/xlint/arch/ia64/targparam.h      |   8 ++--
 usr.bin/xlint/arch/m68000/targparam.h    |   8 ++--
 usr.bin/xlint/arch/m68k/targparam.h      |   8 ++--
 usr.bin/xlint/arch/mips/targparam.h      |  14 +++---
 usr.bin/xlint/arch/mips64/targparam.h    |   8 ++--
 usr.bin/xlint/arch/or1k/targparam.h      |   8 ++--
 usr.bin/xlint/arch/powerpc/targparam.h   |   8 ++--
 usr.bin/xlint/arch/powerpc64/targparam.h |   8 ++--
 usr.bin/xlint/arch/riscv32/targparam.h   |   8 ++--
 usr.bin/xlint/arch/riscv64/targparam.h   |   8 ++--
 usr.bin/xlint/arch/sh3/targparam.h       |   8 ++--
 usr.bin/xlint/arch/sparc/targparam.h     |   8 ++--
 usr.bin/xlint/arch/sparc64/targparam.h   |   8 ++--
 usr.bin/xlint/arch/vax/targparam.h       |   8 ++--
 usr.bin/xlint/arch/x86_64/targparam.h    |   8 ++--
 usr.bin/xlint/common/inittyp.c           |  10 +---
 usr.bin/xlint/lint1/tree.c               |  60 +++++--------------------------
 23 files changed, 101 insertions(+), 143 deletions(-)

diffs (truncated from 644 to 300 lines):

diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/aarch64/targparam.h
--- a/usr.bin/xlint/arch/aarch64/targparam.h    Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/aarch64/targparam.h    Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/alpha/targparam.h
--- a/usr.bin/xlint/arch/alpha/targparam.h      Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/alpha/targparam.h      Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/arm/targparam.h
--- a/usr.bin/xlint/arch/arm/targparam.h        Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/arm/targparam.h        Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/coldfire/targparam.h
--- a/usr.bin/xlint/arch/coldfire/targparam.h   Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/coldfire/targparam.h   Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/hppa/targparam.h
--- a/usr.bin/xlint/arch/hppa/targparam.h       Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/hppa/targparam.h       Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/i386/targparam.h
--- a/usr.bin/xlint/arch/i386/targparam.h       Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/i386/targparam.h       Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/ia64/targparam.h
--- a/usr.bin/xlint/arch/ia64/targparam.h       Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/ia64/targparam.h       Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/m68000/targparam.h
--- a/usr.bin/xlint/arch/m68000/targparam.h     Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/m68000/targparam.h     Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/m68k/targparam.h
--- a/usr.bin/xlint/arch/m68k/targparam.h       Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/m68k/targparam.h       Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/mips/targparam.h
--- a/usr.bin/xlint/arch/mips/targparam.h       Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/mips/targparam.h       Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/mips64/targparam.h
--- a/usr.bin/xlint/arch/mips64/targparam.h     Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/mips64/targparam.h     Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/or1k/targparam.h
--- a/usr.bin/xlint/arch/or1k/targparam.h       Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/or1k/targparam.h       Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/powerpc/targparam.h
--- a/usr.bin/xlint/arch/powerpc/targparam.h    Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/powerpc/targparam.h    Sun Jan 24 14:47:40 2021 +0000
@@ -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
diff -r b0d3a31f7b96 -r 0b0dff519ca7 usr.bin/xlint/arch/powerpc64/targparam.h
--- a/usr.bin/xlint/arch/powerpc64/targparam.h  Sun Jan 24 14:37:32 2021 +0000
+++ b/usr.bin/xlint/arch/powerpc64/targparam.h  Sun Jan 24 14:47:40 2021 +0000
@@ -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 $     */
 



Home | Main Index | Thread Index | Old Index