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: add missing strings for operators
details: https://anonhg.NetBSD.org/src/rev/c76ab63bdef8
branches: trunk
changeset: 958448:c76ab63bdef8
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Jan 05 07:37:41 2021 +0000
description:
lint: add missing strings for operators
It's difficult to keep these lists in sync when they are spread over
several files. The lists had been inconsistent since 2008-04-26. The
inconsistency didn't lead to undefined behavior though since the
operator names are only used in 2 places:
1. check_integer_conversion in message 324 only calls that function with
a few selected operators, all of which are above the missing ones.
2. mkinit prints the node including its operator, but only in debug
mode. Furthermore I'm not sure whether any of the broken operator names
could ever be accessed at this place since mkinit is only called for
expressions, and the node types are INIT, CASE, FARG, which are all
special.
diffstat:
usr.bin/xlint/lint1/print.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r a9ce02604385 -r c76ab63bdef8 usr.bin/xlint/lint1/print.c
--- a/usr.bin/xlint/lint1/print.c Tue Jan 05 00:22:04 2021 +0000
+++ b/usr.bin/xlint/lint1/print.c Tue Jan 05 07:37:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.8 2021/01/03 18:35:51 rillig Exp $ */
+/* $NetBSD: print.c,v 1.9 2021/01/05 07:37:41 rillig Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: print.c,v 1.8 2021/01/03 18:35:51 rillig Exp $");
+__RCSID("$NetBSD: print.c,v 1.9 2021/01/05 07:37:41 rillig Exp $");
#endif
#include <stdio.h>
@@ -101,6 +101,8 @@
"*load*",
"*push*",
"return",
+ "real",
+ "imag",
"*init*",
"*case*",
"*farg*",
Home |
Main Index |
Thread Index |
Old Index