shithub: scc

Download patch

ref: 210ed214bd0c9804f08a68706e216f65c9aec6b4
parent: 9c4b37ce9ec9de17c87e0bea6fa320bac1f146c6
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Jan 9 18:45:13 EST 2016

Initialize field u.token in typedef

This field is used in specifier(), and don't set it
meant that the secondary token was 0 and specifier read
two token from the input, because the type variable
kept being 0.

--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -716,7 +716,7 @@
 			break;
 		case TYPEDEF:
 			flags |= ISTYPEDEF;
-			sym->token = TYPEIDEN;
+			sym->u.token = sym->token = TYPEIDEN;
 			break;
 		}
 		sym->flags = flags;