Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint2 lint: rename uppercase QUAD to LLONG
details: https://anonhg.NetBSD.org/src/rev/cc1241b608aa
branches: trunk
changeset: 377243:cc1241b608aa
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Jul 03 07:03:19 2023 +0000
description:
lint: rename uppercase QUAD to LLONG
No binary change.
diffstat:
tests/usr.bin/xlint/lint2/read.ln | 6 +++---
usr.bin/xlint/common/ilp32.h | 10 +++++-----
usr.bin/xlint/common/inittyp.c | 8 ++++----
usr.bin/xlint/common/lint.h | 6 +++---
usr.bin/xlint/common/lp64.h | 16 ++++++++--------
usr.bin/xlint/lint1/decl.c | 16 ++++++++--------
usr.bin/xlint/lint1/func.c | 8 ++++----
usr.bin/xlint/lint1/lex.c | 18 +++++++++---------
usr.bin/xlint/lint1/lint1.h | 4 ++--
usr.bin/xlint/lint1/tree.c | 16 ++++++++--------
usr.bin/xlint/lint2/chk.c | 22 +++++++++++-----------
usr.bin/xlint/lint2/read.c | 10 +++++-----
12 files changed, 70 insertions(+), 70 deletions(-)
diffs (truncated from 470 to 300 lines):
diff -r 1b4b9f9f6afe -r cc1241b608aa tests/usr.bin/xlint/lint2/read.ln
--- a/tests/usr.bin/xlint/lint2/read.ln Sun Jul 02 23:56:12 2023 +0000
+++ b/tests/usr.bin/xlint/lint2/read.ln Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: read.ln,v 1.6 2023/05/22 12:55:04 rillig Exp $
+# $NetBSD: read.ln,v 1.7 2023/07/03 07:03:19 rillig Exp $
#
# Cover each path of reading declarations, definitions and usages.
@@ -23,8 +23,8 @@ 109 d 0.109 e 4f109 F0 I # INT int f10
110 d 0.110 e 4f110 F0 uI # UINT unsigned int f110(void);
111 d 0.111 e 4f111 F0 L # LONG long f111(void);
112 d 0.112 e 4f112 F0 uL # ULONG unsigned long f112(void);
-113 d 0.113 e 4f113 F0 Q # QUAD long long f113(void);
-114 d 0.114 e 4f114 F0 uQ # UQUAD unsigned long long f114(void);
+113 d 0.113 e 4f113 F0 Q # LLONG long long f113(void);
+114 d 0.114 e 4f114 F0 uQ # ULLONG unsigned long long f114(void);
# INT128 works only in 64-bit mode, see read_lp64.
# UINT128 works only in 64-bit mode, see read_lp64.
117 d 0.117 e 4f117 F0 sD # FLOAT float f117(void);
diff -r 1b4b9f9f6afe -r cc1241b608aa usr.bin/xlint/common/ilp32.h
--- a/usr.bin/xlint/common/ilp32.h Sun Jul 02 23:56:12 2023 +0000
+++ b/usr.bin/xlint/common/ilp32.h Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ilp32.h,v 1.5 2021/01/09 14:10:15 rillig Exp $ */
+/* $NetBSD: ilp32.h,v 1.6 2023/07/03 07:03:19 rillig Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -43,7 +43,7 @@
#define SHORT_SIZE 16
#define INT_SIZE 32
#define LONG_SIZE 32
-#define QUAD_SIZE 64
+#define LLONG_SIZE 64
#define PTR_SIZE 32
#define TARG_SCHAR_MAX ((int8_t) (((uint8_t) -1) >> 1))
@@ -62,6 +62,6 @@
#define TARG_LONG_MIN TARG_INT_MIN
#define TARG_ULONG_MAX TARG_UINT_MAX
-#define TARG_QUAD_MAX ((int64_t) (((uint64_t) -1) >> 1))
-#define TARG_QUAD_MIN ((-TARG_QUAD_MAX) - 1)
-#define TARG_UQUAD_MAX ((uint64_t) -1)
+#define TARG_LLONG_MAX ((int64_t) (((uint64_t) -1) >> 1))
+#define TARG_LLONG_MIN ((-TARG_LLONG_MAX) - 1)
+#define TARG_ULLONG_MAX ((uint64_t) -1)
diff -r 1b4b9f9f6afe -r cc1241b608aa usr.bin/xlint/common/inittyp.c
--- a/usr.bin/xlint/common/inittyp.c Sun Jul 02 23:56:12 2023 +0000
+++ b/usr.bin/xlint/common/inittyp.c Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inittyp.c,v 1.36 2023/06/29 10:31:32 rillig Exp $ */
+/* $NetBSD: inittyp.c,v 1.37 2023/07/03 07:03:19 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: inittyp.c,v 1.36 2023/06/29 10:31:32 rillig Exp $");
+__RCSID("$NetBSD: inittyp.c,v 1.37 2023/07/03 07:03:19 rillig Exp $");
#endif
#if defined(IS_LINT1)
@@ -94,8 +94,8 @@ ttab_t ttab[NTSPEC] = {
typeinfo("unsigned int", INT, UINT, INT_SIZE, INT_RSIZE * 8, 'u'),
typeinfo("long", LONG, ULONG, LONG_SIZE, 32, 's'),
typeinfo("unsigned long", LONG, ULONG, LONG_SIZE, 32, 'u'),
- typeinfo("long long", QUAD, UQUAD, QUAD_SIZE, 64, 's'),
- typeinfo("unsigned long long", QUAD, UQUAD, QUAD_SIZE, 64, 'u'),
+ typeinfo("long long", LLONG, ULLONG, LLONG_SIZE, 64, 's'),
+ typeinfo("unsigned long long", LLONG, ULLONG, LLONG_SIZE, 64, 'u'),
#ifdef INT128_SIZE
typeinfo("__int128_t", INT128, UINT128, INT128_SIZE, 128, 's'),
typeinfo("__uint128_t", INT128, UINT128, INT128_SIZE, 128, 'u'),
diff -r 1b4b9f9f6afe -r cc1241b608aa usr.bin/xlint/common/lint.h
--- a/usr.bin/xlint/common/lint.h Sun Jul 02 23:56:12 2023 +0000
+++ b/usr.bin/xlint/common/lint.h Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint.h,v 1.37 2023/06/29 10:31:32 rillig Exp $ */
+/* $NetBSD: lint.h,v 1.38 2023/07/03 07:03:19 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -64,8 +64,8 @@ typedef enum {
UINT, /* unsigned int */
LONG, /* (signed) long */
ULONG, /* unsigned long */
- QUAD, /* (signed) long long */
- UQUAD, /* unsigned long long */
+ LLONG, /* (signed) long long */
+ ULLONG, /* unsigned long long */
#ifdef INT128_SIZE
INT128, /* (signed) __int128_t */
UINT128, /* __uint128_t */
diff -r 1b4b9f9f6afe -r cc1241b608aa usr.bin/xlint/common/lp64.h
--- a/usr.bin/xlint/common/lp64.h Sun Jul 02 23:56:12 2023 +0000
+++ b/usr.bin/xlint/common/lp64.h Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lp64.h,v 1.10 2021/01/09 14:10:15 rillig Exp $ */
+/* $NetBSD: lp64.h,v 1.11 2023/07/03 07:03:19 rillig Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -43,7 +43,7 @@
#define SHORT_SIZE 16
#define INT_SIZE 32
#define LONG_SIZE 64
-#define QUAD_SIZE 64
+#define LLONG_SIZE 64
#define PTR_SIZE 64
#ifdef _LP64
#define INT128_SIZE 128
@@ -61,13 +61,13 @@
#define TARG_INT_MIN ((-TARG_INT_MAX) - 1)
#define TARG_UINT_MAX ((uint32_t) -1)
-#define TARG_LONG_MAX TARG_QUAD_MAX
-#define TARG_LONG_MIN TARG_QUAD_MIN
-#define TARG_ULONG_MAX TARG_UQUAD_MAX
+#define TARG_LONG_MAX TARG_LLONG_MAX
+#define TARG_LONG_MIN TARG_LLONG_MIN
+#define TARG_ULONG_MAX TARG_ULLONG_MAX
-#define TARG_QUAD_MAX ((int64_t) (((uint64_t) -1) >> 1))
-#define TARG_QUAD_MIN ((-TARG_QUAD_MAX) - 1)
-#define TARG_UQUAD_MAX ((uint64_t) -1)
+#define TARG_LLONG_MAX ((int64_t) (((uint64_t) -1) >> 1))
+#define TARG_LLONG_MIN ((-TARG_LLONG_MAX) - 1)
+#define TARG_ULLONG_MAX ((uint64_t) -1)
#ifdef _LP64
/* XXX on a 32 build for a 64 build host we skip these */
diff -r 1b4b9f9f6afe -r cc1241b608aa usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c Sun Jul 02 23:56:12 2023 +0000
+++ b/usr.bin/xlint/lint1/decl.c Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.339 2023/07/02 21:37:49 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.340 2023/07/03 07:03:19 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.339 2023/07/02 21:37:49 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.340 2023/07/03 07:03:19 rillig Exp $");
#endif
#include <sys/param.h>
@@ -292,7 +292,7 @@ dcs_add_type(type_t *tp)
if (t == LONG && dcs->d_rank_mod == LONG) {
/* "long long" or "long ... long" */
- t = QUAD;
+ t = LLONG;
dcs->d_rank_mod = NO_TSPEC;
if (!long_long_flag)
/* %s does not support 'long long' */
@@ -310,7 +310,7 @@ dcs_add_type(type_t *tp)
if (dcs->d_sign_mod != NO_TSPEC)
dcs->d_invalid_type_combination = true;
dcs->d_sign_mod = t;
- } else if (t == SHORT || t == LONG || t == QUAD) {
+ } else if (t == SHORT || t == LONG || t == LLONG) {
if (dcs->d_rank_mod != NO_TSPEC)
dcs->d_invalid_type_combination = true;
dcs->d_rank_mod = t;
@@ -347,7 +347,7 @@ merge_signedness(tspec_t t, tspec_t s)
: t == SHORT ? USHORT
: t == INT ? UINT
: t == LONG ? ULONG
- : t == QUAD ? UQUAD
+ : t == LLONG ? ULLONG
: t;
}
@@ -363,7 +363,7 @@ typedef_error(type_t *td, tspec_t t)
if ((t == SIGNED || t == UNSIGN) &&
(t2 == CHAR || t2 == SHORT || t2 == INT ||
- t2 == LONG || t2 == QUAD)) {
+ t2 == LONG || t2 == LLONG)) {
if (allow_c90)
/* modifying typedef with '%s'; only qualifiers... */
warning(5, tspec_name(t));
@@ -388,9 +388,9 @@ typedef_error(type_t *td, tspec_t t)
else if (t2 == UINT)
td = gettyp(ULONG);
else if (t2 == LONG)
- td = gettyp(QUAD);
+ td = gettyp(LLONG);
else if (t2 == ULONG)
- td = gettyp(UQUAD);
+ td = gettyp(ULLONG);
else if (t2 == FLOAT)
td = gettyp(DOUBLE);
else if (t2 == DOUBLE)
diff -r 1b4b9f9f6afe -r cc1241b608aa usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c Sun Jul 02 23:56:12 2023 +0000
+++ b/usr.bin/xlint/lint1/func.c Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: func.c,v 1.163 2023/07/02 18:14:44 rillig Exp $ */
+/* $NetBSD: func.c,v 1.164 2023/07/03 07:03:19 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: func.c,v 1.163 2023/07/02 18:14:44 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.164 2023/07/03 07:03:19 rillig Exp $");
#endif
#include <stdlib.h>
@@ -523,7 +523,7 @@ check_case_label(tnode_t *tn, control_st
t = tn->tn_type->t_tspec;
if (t == LONG || t == ULONG ||
- t == QUAD || t == UQUAD) {
+ t == LLONG || t == ULLONG) {
if (!allow_c90)
/* case label must be of type 'int' in traditional C */
warning(203);
@@ -686,7 +686,7 @@ stmt_switch_expr(tnode_t *tn)
}
if (tn != NULL && !allow_c90) {
t = tn->tn_type->t_tspec;
- if (t == LONG || t == ULONG || t == QUAD || t == UQUAD) {
+ if (t == LONG || t == ULONG || t == LLONG || t == ULLONG) {
/* switch expression must be of type 'int' in ... */
warning(271);
}
diff -r 1b4b9f9f6afe -r cc1241b608aa usr.bin/xlint/lint1/lex.c
--- a/usr.bin/xlint/lint1/lex.c Sun Jul 02 23:56:12 2023 +0000
+++ b/usr.bin/xlint/lint1/lex.c Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.166 2023/07/02 18:14:44 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.167 2023/07/03 07:03:19 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: lex.c,v 1.166 2023/07/02 18:14:44 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.167 2023/07/03 07:03:19 rillig Exp $");
#endif
#include <ctype.h>
@@ -465,8 +465,8 @@ lex_integer_constant(const char *yytext,
{
/* C11 6.4.4.1p5 */
static const tspec_t suffix_type[2][3] = {
- { INT, LONG, QUAD, },
- { UINT, ULONG, UQUAD, }
+ { INT, LONG, LLONG, },
+ { UINT, ULONG, ULLONG, }
};
const char *cp = yytext;
@@ -577,12 +577,12 @@ lex_integer_constant(const char *yytext,
warning(252);
}
break;
- case QUAD:
- if (ui > TARG_QUAD_MAX && allow_c90)
- typ = UQUAD;
+ case LLONG:
+ if (ui > TARG_LLONG_MAX && allow_c90)
+ typ = ULLONG;
break;
- case UQUAD:
- if (ui > TARG_UQUAD_MAX && !warned) {
+ case ULLONG:
+ if (ui > TARG_ULLONG_MAX && !warned) {
/* integer constant out of range */
warning(252);
}
diff -r 1b4b9f9f6afe -r cc1241b608aa usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h Sun Jul 02 23:56:12 2023 +0000
+++ b/usr.bin/xlint/lint1/lint1.h Mon Jul 03 07:03:19 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.179 2023/07/02 23:40:23 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.180 2023/07/03 07:03:19 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -345,7 +345,7 @@ typedef struct decl_level {
tspec_t d_abstract_type;/* VOID, BOOL, CHAR, INT or COMPLEX */
tspec_t d_complex_mod; /* FLOAT or DOUBLE */
tspec_t d_sign_mod; /* SIGNED or UNSIGN */
- tspec_t d_rank_mod; /* SHORT, LONG or QUAD */
+ tspec_t d_rank_mod; /* SHORT, LONG or LLONG */
scl_t d_scl; /* storage class */
Home |
Main Index |
Thread Index |
Old Index