aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tccgen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tccgen.c b/tccgen.c
index 20cd453..4e58ef0 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3317,7 +3317,8 @@ static void type_decl(CType *type, AttributeDef *ad, int *v, int td)
nocode_wanted = 1;
}
post_type(type, ad);
- nocode_wanted = saved_nocode_wanted;
+ if (storage & VT_STATIC)
+ nocode_wanted = saved_nocode_wanted;
type->t |= storage;
if (tok == TOK_ATTRIBUTE1 || tok == TOK_ATTRIBUTE2)
parse_attribute(ad);