shithub: scc

Download patch

ref: f761999f59431d41339a2d8978faa43f53aa930e
parent: 8ae1031043e527a86ee96bb6740f10078314583a
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu May 15 07:32:39 EDT 2014

Fix type of fields expressions

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

--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -276,7 +276,7 @@
 	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