aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2017-05-01 06:04:19 +0200
committerMichael Matz <matz@suse.de>2017-05-01 06:04:19 +0200
commit4ce73354fc5e555934bc721e2ab53936df6628e0 (patch)
tree95593c2763c7578cb2da2880f2d6ceef279b9d1f
parentf775d687253df56d136f70e82c7367b6ba62e9fb (diff)
downloadtinycc-4ce73354fc5e555934bc721e2ab53936df6628e0.tar.gz
tinycc-4ce73354fc5e555934bc721e2ab53936df6628e0.tar.bz2
Fix last change
Skipping anonymous bit-fields is correct, but not other anonymous ones like unions or structs.
-rw-r--r--tccgen.c2
1 files changed, 1 insertions, 1 deletions
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");