diff options
| author | rillig <rillig@NetBSD.org> | 2023-07-03 07:03:19 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2023-07-03 07:03:19 +0000 |
| commit | acd7fa764fc50148c6df0336fbad6b5629a1ca0d (patch) | |
| tree | 1d73e14e2d554709570587cb3f31bf60e205bac4 | |
| parent | d310a7542a8beeb64eea5809995ec2e268d12ee9 (diff) | |
lint: rename uppercase QUAD to LLONG
No binary change.
| -rw-r--r-- | tests/usr.bin/xlint/lint2/read.ln | 6 | ||||
| -rw-r--r-- | usr.bin/xlint/common/ilp32.h | 10 | ||||
| -rw-r--r-- | usr.bin/xlint/common/inittyp.c | 8 | ||||
| -rw-r--r-- | usr.bin/xlint/common/lint.h | 6 | ||||
| -rw-r--r-- | usr.bin/xlint/common/lp64.h | 16 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/decl.c | 16 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/func.c | 8 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/lex.c | 18 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/lint1.h | 4 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/tree.c | 16 | ||||
| -rw-r--r-- | usr.bin/xlint/lint2/chk.c | 22 | ||||
| -rw-r--r-- | usr.bin/xlint/lint2/read.c | 10 |
12 files changed, 70 insertions, 70 deletions
diff --git a/tests/usr.bin/xlint/lint2/read.ln b/tests/usr.bin/xlint/lint2/read.ln index 1df5e5404a4..06cf4149a96 100644 --- a/tests/usr.bin/xlint/lint2/read.ln +++ b/tests/usr.bin/xlint/lint2/read.ln @@ -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 @@ S read.c 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 --git a/usr.bin/xlint/common/ilp32.h b/usr.bin/xlint/common/ilp32.h index 13c13a3abda..f829726d827 100644 --- a/usr.bin/xlint/common/ilp32.h +++ b/usr.bin/xlint/common/ilp32.h @@ -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 --git a/usr.bin/xlint/common/inittyp.c b/usr.bin/xlint/common/inittyp.c index 2aecf148312..7cf54335dfb 100644 --- a/usr.bin/xlint/common/inittyp.c +++ b/usr.bin/xlint/common/inittyp.c @@ -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 --git a/usr.bin/xlint/common/lint.h b/usr.bin/xlint/common/lint.h index 7962b5920ba..6b0871a97f7 100644 --- a/usr.bin/xlint/common/lint.h +++ b/usr.bin/xlint/common/lint.h @@ -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 --git a/usr.bin/xlint/common/lp64.h b/usr.bin/xlint/common/lp64.h index 1f4789c4a34..475dbf53db4 100644 --- a/usr.bin/xlint/common/lp64.h +++ b/usr.bin/xlint/common/lp64.h @@ -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 --git a/usr.bin/xlint/lint1/decl.c b/usr.bin/xlint/lint1/decl.c index b338d3c626f..926f45db5a7 100644 --- a/usr.bin/xlint/lint1/decl.c +++ b/usr.bin/xlint/lint1/decl.c @@ -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 --git a/usr.bin/xlint/lint1/func.c b/usr.bin/xlint/lint1/func.c index 1b61bf91832..3f4f58feb11 100644 --- a/usr.bin/xlint/lint1/func.c +++ b/usr.bin/xlint/lint1/func.c @@ -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_statement *cs) 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 --git a/usr.bin/xlint/lint1/lex.c b/usr.bin/xlint/lint1/lex.c index 92a0c952df4..a60cc5666d1 100644 --- a/usr.bin/xlint/lint1/lex.c +++ b/usr.bin/xlint/lint1/lex.c @@ -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, size_t yyleng, int base) { /* 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, size_t yyleng, int base) 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 --git a/usr.bin/xlint/lint1/lint1.h b/usr.bin/xlint/lint1/lint1.h index a0267d73a8a..7787e0af8c5 100644 --- a/usr.bin/xlint/lint1/lint1.h +++ b/usr.bin/xlint/lint1/lint1.h @@ -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 */ type_t *d_type; /* after dcs_end_type, the pointer to the type * used for all declarators */ diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c index 946652c1017..d29021f2d6c 100644 --- a/usr.bin/xlint/lint1/tree.c +++ b/usr.bin/xlint/lint1/tree.c @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.544 2023/07/02 18:14:44 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.545 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: tree.c,v 1.544 2023/07/02 18:14:44 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.545 2023/07/03 07:03:19 rillig Exp $"); #endif #include <float.h> @@ -656,7 +656,7 @@ static const tspec_t arith_rank[] = { #ifdef INT128_SIZE UINT128, INT128, #endif - UQUAD, QUAD, + ULLONG, LLONG, ULONG, LONG, UINT, INT, }; @@ -3444,7 +3444,7 @@ convert_integer_from_integer(op_t op, int arg, tspec_t nt, tspec_t ot, if (aflag > 0 && portable_size_in_bits(nt) < portable_size_in_bits(ot) && - (ot == LONG || ot == ULONG || ot == QUAD || ot == UQUAD || + (ot == LONG || ot == ULONG || ot == LLONG || ot == ULLONG || aflag > 1) && !can_represent(tp, tn)) { if (op == FARG) { @@ -3698,10 +3698,10 @@ convert_constant_floating(op_t op, int arg, tspec_t ot, const type_t *tp, max = TARG_LONG_MAX; min = TARG_LONG_MIN; break; case ULONG: max = TARG_ULONG_MAX; min = 0; break; - case QUAD: - max = QUAD_MAX; min = QUAD_MIN; break; - case UQUAD: - max = UQUAD_MAX; min = 0; break; + case LLONG: + max = LLONG_MAX; min = LLONG_MIN; break; + case ULLONG: + max = ULLONG_MAX; min = 0; break; case FLOAT: case FCOMPLEX: max = FLT_MAX; min = -FLT_MAX; break; diff --git a/usr.bin/xlint/lint2/chk.c b/usr.bin/xlint/lint2/chk.c index 5bc31a41a91..2544b0d6ea1 100644 --- a/usr.bin/xlint/lint2/chk.c +++ b/usr.bin/xlint/lint2/chk.c @@ -1,4 +1,4 @@ -/* $NetBSD: chk.c,v 1.55 2023/06/09 13:03:49 rillig Exp $ */ +/* $NetBSD: chk.c,v 1.56 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: chk.c,v 1.55 2023/06/09 13:03:49 rillig Exp $"); +__RCSID("$NetBSD: chk.c,v 1.56 2023/07/03 07:03:19 rillig Exp $"); #endif #include <ctype.h> @@ -700,7 +700,7 @@ printflike(const hte_t *hte, fcall_t *call, int n, const char *fmt, type_t **ap) } else if (fc == 'l') { sz = LONG; } else if (fc == 'q') { - sz = QUAD; + sz = LLONG; } else if (fc == 'L') { sz = LDOUBLE; } @@ -738,8 +738,8 @@ printflike(const hte_t *hte, fcall_t *call, int n, const char *fmt, type_t **ap) if (sz == LONG) { if (t1 != LONG && (hflag || t1 != ULONG)) inconsistent_arguments(hte, call, n); - } else if (sz == QUAD) { - if (t1 != QUAD && (hflag || t1 != UQUAD)) + } else if (sz == LLONG) { + if (t1 != LLONG && (hflag || t1 != ULLONG)) inconsistent_arguments(hte, call, n); } else { /* @@ -756,8 +756,8 @@ printflike(const hte_t *hte, fcall_t *call, int n, const char *fmt, type_t **ap) if (sz == LONG) { if (t1 != ULONG && (hflag || t1 != LONG)) inconsistent_arguments(hte, call, n); - } else if (sz == QUAD) { - if (t1 != UQUAD && (hflag || t1 != QUAD)) + } else if (sz == LLONG) { + if (t1 != ULLONG && (hflag || t1 != LLONG)) inconsistent_arguments(hte, call, n); } else if (sz == SHORT) { /* USHORT was promoted to INT or UINT */ @@ -871,7 +871,7 @@ scanflike(const hte_t *hte, fcall_t *call, int n, const char *fmt, type_t **ap) } else if (fc == 'l') { sz = LONG; } else if (fc == 'q') { - sz = QUAD; + sz = LLONG; } else if (fc == 'L') { sz = LDOUBLE; } @@ -898,7 +898,7 @@ scanflike(const hte_t *hte, fcall_t *call, int n, const char *fmt, type_t **ap) if (fc == 'd' || fc == 'i' || fc == 'n') { if (sz == LDOUBLE) bad_format_string(hte, call); - if (sz != SHORT && sz != LONG && sz != QUAD) + if (sz != SHORT && sz != LONG && sz != LLONG) sz = INT; conv: if (!noasgn) { @@ -919,8 +919,8 @@ scanflike(const hte_t *hte, fcall_t *call, int n, const char *fmt, type_t **ap) sz = USHORT; } else if (sz == LONG) { sz = ULONG; - } else if (sz == QUAD) { - sz = UQUAD; + } else if (sz == LLONG) { + sz = ULLONG; } else { sz = UINT; } diff --git a/usr.bin/xlint/lint2/read.c b/usr.bin/xlint/lint2/read.c index d4723d5b02b..5554cd3b322 100644 --- a/usr.bin/xlint/lint2/read.c +++ b/usr.bin/xlint/lint2/read.c @@ -1,4 +1,4 @@ -/* $NetBSD: read.c,v 1.81 2023/06/09 13:03:49 rillig Exp $ */ +/* $NetBSD: read.c,v 1.82 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: read.c,v 1.81 2023/06/09 13:03:49 rillig Exp $"); +__RCSID("$NetBSD: read.c,v 1.82 2023/07/03 07:03:19 rillig Exp $"); #endif #include <ctype.h> @@ -617,7 +617,7 @@ parse_tspec(const char **pp, char c, bool *osdef) case 'L': return s == 'u' ? ULONG : LONG; case 'Q': - return s == 'u' ? UQUAD : QUAD; + return s == 'u' ? ULLONG : LLONG; #ifdef INT128_SIZE case 'J': return s == 'u' ? UINT128 : INT128; @@ -815,9 +815,9 @@ gettlen(const char *cp, const char **epp) break; case 'Q': if (s == 'u') - t = UQUAD; + t = ULLONG; else if (s == '\0') - t = QUAD; + t = LLONG; break; #ifdef INT128_SIZE case 'J': |
