Module Name: src
Committed By: rillig
Date: Sat Mar 20 11:33:50 UTC 2021
Modified Files:
src/usr.bin/xlint/lint1: cgram.y
Log Message:
lint: remove unnecessary '%prec T_COMMA' from grammar
My previous commit message was wrong in saying that the '%prec' was
necessary. It is not necessary.
Most probably I misspelled the name of the grammar rule as opt_comma
instead of comma_opt, which would lead to the same number of conflicts
in the grammar plus a warning, but no build failure.
To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 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.181 src/usr.bin/xlint/lint1/cgram.y:1.182
--- src/usr.bin/xlint/lint1/cgram.y:1.181 Sat Mar 20 11:24:49 2021
+++ src/usr.bin/xlint/lint1/cgram.y Sat Mar 20 11:33:50 2021
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.181 2021/03/20 11:24:49 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.182 2021/03/20 11:33:50 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.181 2021/03/20 11:24:49 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.182 2021/03/20 11:33:50 rillig Exp $");
#endif
#include <limits.h>
@@ -1332,7 +1332,7 @@ initializer: /* C99 6.7.8 "Initializat
| init_lbrace init_rbrace {
/* XXX: Empty braces are not covered by C99 6.7.8. */
}
- | init_lbrace initializer_list %prec T_COMMA comma_opt init_rbrace
+ | init_lbrace initializer_list comma_opt init_rbrace
| error
;