Module Name: src Committed By: rillig Date: Tue Jul 6 20:29:08 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.262 -r1.263 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.262 src/usr.bin/xlint/lint1/cgram.y:1.263 --- src/usr.bin/xlint/lint1/cgram.y:1.262 Tue Jul 6 19:08:28 2021 +++ src/usr.bin/xlint/lint1/cgram.y Tue Jul 6 20:29:08 2021 @@ -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 @@ anonymize(sym_t *s) } %} -%expect 164 +%expect 162 %union { val_t *y_val; @@ -1845,12 +1845,6 @@ term: | 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));