aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tccgen.c b/tccgen.c
index 202ed07..bbe1d83 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3179,10 +3179,8 @@ static void struct_decl(CType *type, AttributeDef *ad, int u)
a = tok; /* save decl type */
next();
- if (tok == TOK_ATTRIBUTE1 || tok == TOK_ATTRIBUTE2) {
+ if (tok == TOK_ATTRIBUTE1 || tok == TOK_ATTRIBUTE2)
parse_attribute(ad);
- next();
- }
if (tok != '{') {
v = tok;
next();
@@ -3302,7 +3300,7 @@ static void struct_decl(CType *type, AttributeDef *ad, int u)
if (ad1.a.aligned) {
if (align < ad1.a.aligned)
align = ad1.a.aligned;
- } else if (ad1.a.packed) {
+ } else if (ad1.a.packed || ad->a.packed) {
align = 1;
} else if (*tcc_state->pack_stack_ptr) {
if (align > *tcc_state->pack_stack_ptr)