aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2017-03-06 22:38:45 +0100
committerMichael Matz <matz@suse.de>2017-05-02 03:07:37 +0200
commit7aef0522b0ac36726d0889ed5765f93430c2e846 (patch)
treeaeba5f4669ed196cab58d97cc7089674da6cfb4e /tccgen.c
parent8ca98e23c4e54b1552c819425890584e6357f46a (diff)
downloadtinycc-7aef0522b0ac36726d0889ed5765f93430c2e846.tar.gz
tinycc-7aef0522b0ac36726d0889ed5765f93430c2e846.tar.bz2
Tidy decl_designator
The fixme therein is long solved.
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/tccgen.c b/tccgen.c
index 2f93796..ad60150 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -5970,7 +5970,6 @@ static void decl_designator(CType *type, Section *sec, unsigned long c,
{
Sym *s, *f;
int notfirst, index, index_last, align, l, nb_elems, elem_size;
- CType type1;
notfirst = 0;
elem_size = 0;
@@ -6022,10 +6021,7 @@ static void decl_designator(CType *type, Section *sec, unsigned long c,
expect("field");
if (!notfirst)
*cur_field = f;
- /* XXX: fix this mess by using explicit storage field */
- type1 = f->type;
- type1.t |= (type->t & ~VT_TYPE);
- type = &type1;
+ type = &f->type;
c += f->c;
}
notfirst = 1;
@@ -6050,10 +6046,7 @@ static void decl_designator(CType *type, Section *sec, unsigned long c,
*cur_field = f = f->next;
if (!f)
tcc_error("too many field init");
- /* XXX: fix this mess by using explicit storage field */
- type1 = f->type;
- type1.t |= (type->t & ~VT_TYPE);
- type = &type1;
+ type = &f->type;
c += f->c;
}
}