aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2012-10-25 20:14:55 +0200
committerThomas Preud'homme <robotux@celest.fr>2012-10-25 20:14:55 +0200
commit508df168f42a58ac296b4fdce308b6d7eed16dc7 (patch)
tree60f2ff2c521f87025c9a69f8898e66686593185c /tccgen.c
parentcf95ac399cbce1ea8a519f91dd36a5cfd4ea7943 (diff)
downloadtinycc-508df168f42a58ac296b4fdce308b6d7eed16dc7.tar.gz
tinycc-508df168f42a58ac296b4fdce308b6d7eed16dc7.tar.bz2
Fix commit 85f6fad3a6acbfa07a3dc45b673965fc26890d8e
Don't reset nocode_wanted with saved_nocode_wanted if it hasn't been modified (and hence saved_nocode_wanted is uninitialized).
Diffstat (limited to 'tccgen.c')
-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);