Module Name: src
Committed By: rillig
Date: Fri Mar 26 16:05:19 UTC 2021
Modified Files:
src/usr.bin/xlint/lint1: cgram.y
Log Message:
lint: remove redundant '%prec' from grammar for compound literals
No change to the resulting binary.
To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 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.200 src/usr.bin/xlint/lint1/cgram.y:1.201
--- src/usr.bin/xlint/lint1/cgram.y:1.200 Thu Mar 25 21:51:55 2021
+++ src/usr.bin/xlint/lint1/cgram.y Fri Mar 26 16:05:19 2021
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.200 2021/03/25 21:51:55 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.201 2021/03/26 16:05:19 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.200 2021/03/25 21:51:55 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.201 2021/03/26 16:05:19 rillig Exp $");
#endif
#include <limits.h>
@@ -1996,7 +1996,7 @@ term:
| T_LPAREN type_name T_RPAREN term %prec T_UNARY {
$$ = cast($4, $2);
}
- | T_LPAREN type_name T_RPAREN %prec T_UNARY {
+ | T_LPAREN type_name T_RPAREN { /* C99 6.5.2.5 "Compound literals" */
sym_t *tmp = mktempsym($2);
begin_initialization(tmp);
cgram_declare(tmp, true, NULL);