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: resolve conflict in grammar for __...
details: https://anonhg.NetBSD.org/src/rev/0beda5703cec
branches: trunk
changeset: 984428:0beda5703cec
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Jul 06 20:29:08 2021 +0000
description:
lint: resolve conflict in grammar for __real__ and __imag__
There is no need for extra rules for '__real__(term)' since that is
already handled by the simpler '__real__ term', just a few lines further
up in the grammar. Likewise for __imag__.
The GCC manual does not mention anything about parentheses either.
diffstat:
usr.bin/xlint/lint1/cgram.y | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diffs (41 lines):
diff -r 60d6a7999458 -r 0beda5703cec usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Tue Jul 06 20:17:15 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Tue Jul 06 20:29:08 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.262 2021/07/06 19:08:28 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.263 2021/07/06 20:29:08 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.262 2021/07/06 19:08:28 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.263 2021/07/06 20:29:08 rillig Exp $");
#endif
#include <limits.h>
@@ -123,7 +123,7 @@
}
%}
-%expect 164
+%expect 162
%union {
val_t *y_val;
@@ -1845,12 +1845,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