Module Name: src
Committed By: rillig
Date: Tue Jun 29 05:41:45 UTC 2021
Modified Files:
src/usr.bin/xlint/lint1: cgram.y
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 src/usr.bin/xlint/lint1/cgram.y
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.247 src/usr.bin/xlint/lint1/cgram.y:1.248
--- src/usr.bin/xlint/lint1/cgram.y:1.247 Mon Jun 28 11:09:35 2021
+++ src/usr.bin/xlint/lint1/cgram.y Tue Jun 29 05:41:45 2021
@@ -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));