Module Name:    src
Committed By:   rillig
Date:           Sat Jul 10 15:04:07 UTC 2021

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

Log Message:
lint: swap order in grammar rule clrtyp_typespec

It should not make a difference whether the rule says 'T_TYPENAME
clrtyp' or 'clrtyp T_TYPENAME'.  The latter order is more consistent
with the name of the rule, though.

According to the code, these two tokens take completely distinct
actions.  The code coverage outside of cgram.y and cgram.c stays exactly
the same, at least for lint's test suite.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 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.289 src/usr.bin/xlint/lint1/cgram.y:1.290
--- src/usr.bin/xlint/lint1/cgram.y:1.289	Sat Jul 10 14:45:15 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Sat Jul 10 15:04:07 2021
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.289 2021/07/10 14:45:15 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.290 2021/07/10 15:04:07 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.289 2021/07/10 14:45:15 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.290 2021/07/10 15:04:07 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -571,8 +571,8 @@ clrtyp_typespec:
 	  clrtyp notype_typespec {
 		$$ = $2;
 	  }
-	| T_TYPENAME clrtyp {
-		$$ = getsym($1)->s_type;
+	| clrtyp T_TYPENAME {
+		$$ = getsym($2)->s_type;
 	  }
 	;
 

Reply via email to