scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 210ed214bd0c9804f08a68706e216f65c9aec6b4
parent 9c4b37ce9ec9de17c87e0bea6fa320bac1f146c6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  9 Jan 2016 23:45:13 +0100

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.

Diffstat:
Mcc1/decl.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -716,7 +716,7 @@ identifier(struct decl *dcl) break; case TYPEDEF: flags |= ISTYPEDEF; - sym->token = TYPEIDEN; + sym->u.token = sym->token = TYPEIDEN; break; } sym->flags = flags;