scc

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

commit ac1f52ccad9cb7919726a64c458763eb78f5dd4a
parent b9a6331f4400d1372d2747c8dd371fefe6576a60
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 13 May 2014 12:42:41 +0200

Fix structure field declaration

newfield() has to receive a pointer to the struct type, but a pointer
to the type of the field was passed.

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

diff --git a/cc1/decl.c b/cc1/decl.c @@ -315,7 +315,7 @@ fielddcl(Type *base, uint8_t ns) if (yytoken != ';') { do { sym = declarator(tp, ns, ID_EXPECTED); - newfield(tp, sym); + newfield(base, sym); } while (accept(',')); }