scc

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

commit f761999f59431d41339a2d8978faa43f53aa930e
parent 8ae1031043e527a86ee96bb6740f10078314583a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 15 May 2014 11:32:39 +0200

Fix type of fields expressions

The type of a field expression is the type of the field, not the type
of the structure.

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

diff --git a/cc1/decl.c b/cc1/decl.c @@ -276,7 +276,7 @@ newfield(Type *tp, Symbol *sym) p->name = xstrdup(s); p->next = NULL; p->id = sym->id; - p->type = tp; + p->type = sym->type; if (!q) tp->u.fields = p; else