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/0beb1e7e740a
branches: trunk
changeset: 379954:0beb1e7e740a
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 06c86e185a5d -r 0beb1e7e740a 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:
| 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