From d37415b4e9fddeca96f9747c815a26c23290cdc2 Mon Sep 17 00:00:00 2001 From: rillig Date: Sat, 20 Mar 2021 11:33:50 +0000 Subject: [PATCH] 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. --- usr.bin/xlint/lint1/cgram.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/xlint/lint1/cgram.y b/usr.bin/xlint/lint1/cgram.y index 665e0bdd6c15..4c7c001b5674 100644 --- a/usr.bin/xlint/lint1/cgram.y +++ b/usr.bin/xlint/lint1/cgram.y @@ -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 #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 @@ -1332,7 +1332,7 @@ initializer: /* C99 6.7.8 "Initialization" */ | 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 ;