Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint Disable __int128 checks if we are not building...



details:   https://anonhg.NetBSD.org/src/rev/aa76b9cea39e
branches:  trunk
changeset: 836278:aa76b9cea39e
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 07 14:20:01 2018 +0000

description:
Disable __int128 checks if we are not building on a 64 bit host (
this is suboptimal, but it is the easiest way).

diffstat:

 usr.bin/xlint/common/lp64.h |   5 ++++-
 usr.bin/xlint/lint1/scan.l  |  10 +++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diffs (69 lines):

diff -r 0bcae539b036 -r aa76b9cea39e usr.bin/xlint/common/lp64.h
--- a/usr.bin/xlint/common/lp64.h       Sun Oct 07 12:00:07 2018 +0000
+++ b/usr.bin/xlint/common/lp64.h       Sun Oct 07 14:20:01 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lp64.h,v 1.5 2018/09/07 15:16:15 christos Exp $        */
+/*     $NetBSD: lp64.h,v 1.6 2018/10/07 14:20:01 christos Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -67,6 +67,9 @@
 #define        TARG_QUAD_MIN   ((-TARG_QUAD_MAX) - 1)
 #define        TARG_UQUAD_MAX  ((uint64_t) -1)
 
+#ifndef _LP64
+/* XXX on a 32 build for a 64 build host we skip these */
 #define        TARG_INT128_MAX         ((__int128_t) (((__uint128_t) -1) >> 1))
 #define        TARG_INT128_MIN         ((-TARG_INT128_MAX) - 1)
 #define        TARG_UINT128_MAX        ((__uint128_t) -1)
+#endif
diff -r 0bcae539b036 -r aa76b9cea39e usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Sun Oct 07 12:00:07 2018 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Sun Oct 07 14:20:01 2018 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.83 2018/09/07 15:16:15 christos Exp $ */
+/* $NetBSD: scan.l,v 1.84 2018/10/07 14:20:01 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.83 2018/09/07 15:16:15 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.84 2018/10/07 14:20:01 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -558,7 +558,7 @@
        char    c, *eptr;
        tspec_t typ;
        int     ansiu;
-#ifdef INT128_SIZE
+#ifdef TARG_INT128_MAX
        __uint128_t uq = 0;
        static  tspec_t contypes[2][4] = {
                { INT,  LONG,  QUAD, INT128, },
@@ -689,17 +689,21 @@
                break;
 #ifdef INT128_SIZE
        case INT128:
+#ifdef TARG_INT128_MAX
                if (uq > TARG_INT128_MAX && !tflag) {
                        typ = UINT128;
                        if (!sflag)
                                ansiu = 1;
                }
+#endif
                break;
        case UINT128:
+#ifdef TARG_INT128_MAX
                if (uq > TARG_UINT128_MAX) {
                        /* integer constant out of range */
                        warning(252);
                }
+#endif
                break;
 #endif
                /* LINTED206: (enumeration values not handled in switch) */



Home | Main Index | Thread Index | Old Index