From 4ce73354fc5e555934bc721e2ab53936df6628e0 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 1 May 2017 06:04:19 +0200 Subject: [PATCH] Fix last change Skipping anonymous bit-fields is correct, but not other anonymous ones like unions or structs. --- tccgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tccgen.c b/tccgen.c index 4252c57..a5de7e9 100644 --- a/tccgen.c +++ b/tccgen.c @@ -6075,7 +6075,7 @@ 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)) + while (f && (f->v & SYM_FIRST_ANOM) && (f->type.t & VT_BITFIELD)) *cur_field = f = f->next; if (!f) tcc_error("too many field init");