aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-06-04 00:01:40 -0700
committerMichael Forney <mforney@mforney.org>2019-06-04 00:01:40 -0700
commitf0465801c10359224330c81bcdd857584e07634a (patch)
tree4b75748f16c7ba6a6e803dbb2e491d20c2676204 /decl.c
parent1461f251570cb768122fc7ab2040b1d32366651e (diff)
Fix non-adjacent bit-fields
Diffstat (limited to 'decl.c')
-rw-r--r--decl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/decl.c b/decl.c
index f404d71..050bf05 100644
--- a/decl.c
+++ b/decl.c
@@ -709,6 +709,7 @@ addmember(struct structbuilder *b, struct qualtype mt, char *name, int align, ui
if (t->size < mt.type->size)
t->size = mt.type->size;
}
+ b->bits = 0;
} else { /* bit-field */
if (!(mt.type->prop & PROPINT))
error(&tok.loc, "bit-field has invalid type");