aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index d558ff8..4252c57 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -6075,6 +6075,8 @@ static void decl_designator(CType *type, Section *sec, unsigned long c,
c += index * type_size(type, &align);
} else {
f = *cur_field;
+ while (f && (f->v & SYM_FIRST_ANOM))
+ *cur_field = f = f->next;
if (!f)
tcc_error("too many field init");
/* XXX: fix this mess by using explicit storage field */