Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint lint: rename basic_type_name to tspec_name
details: https://anonhg.NetBSD.org/src/rev/7e8b24c12841
branches: trunk
changeset: 979543:7e8b24c12841
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Jan 01 01:42:55 2021 +0000
description:
lint: rename basic_type_name to tspec_name
The term "basic type" is precisely defined in C99 6.2.5p14, and tspec_t
is close to that, but nowhere identical.
diffstat:
usr.bin/xlint/common/externs.h | 4 ++--
usr.bin/xlint/common/tyname.c | 10 +++++-----
usr.bin/xlint/lint1/decl.c | 8 ++++----
usr.bin/xlint/lint1/tree.c | 12 ++++++------
4 files changed, 17 insertions(+), 17 deletions(-)
diffs (139 lines):
diff -r 61bdb23d3a97 -r 7e8b24c12841 usr.bin/xlint/common/externs.h
--- a/usr.bin/xlint/common/externs.h Fri Jan 01 01:38:14 2021 +0000
+++ b/usr.bin/xlint/common/externs.h Fri Jan 01 01:42:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: externs.h,v 1.8 2020/12/29 13:33:03 rillig Exp $ */
+/* $NetBSD: externs.h,v 1.9 2021/01/01 01:42:55 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -46,7 +46,7 @@
*/
extern const char *tyname(char *, size_t, const type_t *);
extern int sametype(const type_t *, const type_t *);
-extern const char *basic_type_name(tspec_t);
+extern const char *tspec_name(tspec_t);
/*
* mem.c
diff -r 61bdb23d3a97 -r 7e8b24c12841 usr.bin/xlint/common/tyname.c
--- a/usr.bin/xlint/common/tyname.c Fri Jan 01 01:38:14 2021 +0000
+++ b/usr.bin/xlint/common/tyname.c Fri Jan 01 01:42:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tyname.c,v 1.17 2020/12/31 18:51:28 rillig Exp $ */
+/* $NetBSD: tyname.c,v 1.18 2021/01/01 01:42:55 rillig Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tyname.c,v 1.17 2020/12/31 18:51:28 rillig Exp $");
+__RCSID("$NetBSD: tyname.c,v 1.18 2021/01/01 01:42:55 rillig Exp $");
#endif
#include <limits.h>
@@ -54,7 +54,7 @@
#endif
const char *
-basic_type_name(tspec_t t)
+tspec_name(tspec_t t)
{
switch (t) {
case BOOL: return "_Bool";
@@ -90,7 +90,7 @@
case SIGNED: return "signed";
case UNSIGN: return "unsigned";
default:
- LERROR("basic_type_name(%d)", t);
+ LERROR("tspec_name(%d)", t);
return NULL;
}
}
@@ -172,7 +172,7 @@
if ((t = tp->t_tspec) == INT && tp->t_isenum)
t = ENUM;
- s = basic_type_name(t);
+ s = tspec_name(t);
cv[0] = '\0';
if (tp->t_const)
diff -r 61bdb23d3a97 -r 7e8b24c12841 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c Fri Jan 01 01:38:14 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c Fri Jan 01 01:42:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.90 2021/01/01 01:29:30 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.91 2021/01/01 01:42:55 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.90 2021/01/01 01:29:30 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.91 2021/01/01 01:42:55 rillig Exp $");
#endif
#include <sys/param.h>
@@ -305,7 +305,7 @@
else if (dcs->d_cmod == DOUBLE) {
t = DCOMPLEX;
} else
- error(308, basic_type_name(dcs->d_cmod));
+ error(308, tspec_name(dcs->d_cmod));
dcs->d_cmod = NOTSPEC;
}
@@ -800,7 +800,7 @@
case LCOMPLEX:
break;
default:
- LERROR("deftyp(%s)", basic_type_name(t));
+ LERROR("deftyp(%s)", tspec_name(t));
}
if (t != INT && t != CHAR && (s != NOTSPEC || l != NOTSPEC)) {
dcs->d_terr = 1;
diff -r 61bdb23d3a97 -r 7e8b24c12841 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Fri Jan 01 01:38:14 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c Fri Jan 01 01:42:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.110 2021/01/01 01:38:14 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.111 2021/01/01 01:42:55 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.110 2021/01/01 01:38:14 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.111 2021/01/01 01:42:55 rillig Exp $");
#endif
#include <float.h>
@@ -2200,17 +2200,17 @@
if ((lt == STRUCT || lt == UNION) &&
(rt == STRUCT || rt == UNION)) {
/* assignment of different structures (%s != %s) */
- error(240, basic_type_name(lt), basic_type_name(rt));
+ error(240, tspec_name(lt), tspec_name(rt));
} else {
/* assignment type mismatch (%s != %s) */
- error(171, basic_type_name(lt), basic_type_name(rt));
+ error(171, tspec_name(lt), tspec_name(rt));
}
} else if (mp->m_binary) {
/* operands of '%s' have incompatible types (%s != %s) */
- error(107, mp->m_name, basic_type_name(lt), basic_type_name(rt));
+ error(107, mp->m_name, tspec_name(lt), tspec_name(rt));
} else {
/* operand of '%s' has incompatible type (%s != %s) */
- error(108, mp->m_name, basic_type_name(lt), basic_type_name(rt));
+ error(108, mp->m_name, tspec_name(lt), tspec_name(rt));
}
}
Home |
Main Index |
Thread Index |
Old Index