Module Name:    src
Committed By:   rillig
Date:           Sun Jul 11 19:46:09 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.313 -r1.314 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.313 src/usr.bin/xlint/lint1/cgram.y:1.314
--- src/usr.bin/xlint/lint1/cgram.y:1.313	Sun Jul 11 19:24:41 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Sun Jul 11 19:46:09 2021
@@ -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 @@ anonymize(sym_t *s)
 
 %}
 
-%expect 167
+%expect 165
 
 %union {
 	val_t	*y_val;
@@ -1853,12 +1853,6 @@ term:				/* see C99 6.5.1 */
 	| 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));

Reply via email to