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: remove comment from grammar rule t...
details: https://anonhg.NetBSD.org/src/rev/483c00edc994
branches: trunk
changeset: 984232:483c00edc994
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Jun 29 05:41:45 2021 +0000
description:
lint: remove comment from grammar rule type_direct_decl
The 'identifier' in type_direct_decl is necessary, as demonstrated in
the test d_typename_as_var. Replacing T_NAME with 'identifier' in
notype_direct_decl would increase the shift/reduce conflicts by 6. To
keep this number low, keep everything as-is.
diffstat:
usr.bin/xlint/lint1/cgram.y | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diffs (30 lines):
diff -r 88d3c3ef242e -r 483c00edc994 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Tue Jun 29 00:35:23 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Tue Jun 29 05:41:45 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.247 2021/06/28 11:09:35 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.248 2021/06/29 05:41:45 rillig 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: cgram.y,v 1.247 2021/06/28 11:09:35 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.248 2021/06/29 05:41:45 rillig Exp $");
#endif
#include <limits.h>
@@ -1091,10 +1091,6 @@
| notype_direct_decl type_attribute_list
;
-/*
- * TODO: document whether the subtle difference between 'identifier' here and
- * 'T_NAME' in notype_direct_decl above is on purpose.
- */
type_direct_decl:
identifier {
$$ = declarator_name(getsym($1));
Home |
Main Index |
Thread Index |
Old Index