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 grammar conflict for __real...
details: https://anonhg.NetBSD.org/src/rev/a8590f26dda0
branches: trunk
changeset: 984559:a8590f26dda0
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jul 11 19:46:09 2021 +0000
description:
lint: remove grammar conflict for __real__ and __imag__
The rules were redundant since a term can be parenthesized by itself,
there is no need for an extra rule. The rules for '__real__(term)' and
'__imag__(term)' were never reduced since these cases were handled by
the rules '__real__ term' and '__imag__ term' a few lines above.
No functional change.
diffstat:
usr.bin/xlint/lint1/cgram.y | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diffs (41 lines):
diff -r 7b884c895b46 -r a8590f26dda0 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Sun Jul 11 19:39:00 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Sun Jul 11 19:46:09 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.313 2021/07/11 19:24:41 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.314 2021/07/11 19:46:09 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.313 2021/07/11 19:24:41 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.314 2021/07/11 19:46:09 rillig Exp $");
#endif
#include <limits.h>
@@ -124,7 +124,7 @@
%}
-%expect 167
+%expect 165
%union {
val_t *y_val;
@@ -1853,12 +1853,6 @@
| T_EXTENSION term {
$$ = $2;
}
- | T_REAL T_LPAREN term T_RPAREN {
- $$ = build(REAL, $3, NULL);
- }
- | T_IMAG T_LPAREN term T_RPAREN {
- $$ = build(IMAG, $3, NULL);
- }
| T_BUILTIN_OFFSETOF T_LPAREN type_name T_COMMA identifier T_RPAREN {
symtyp = FMEMBER;
$$ = build_offsetof($3, getsym($5));
Home |
Main Index |
Thread Index |
Old Index