aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/decl.c b/decl.c
index 1bfce87..0d53926 100644
--- a/decl.c
+++ b/decl.c
@@ -1032,8 +1032,10 @@ decl(struct scope *s, struct func *f)
error(&tok.loc, "object '%s' redefined", name);
init = parseinit(s, d->type);
hasinit = true;
- } else if (d->linkage != LINKNONE && (!(sc & SCTHREADLOCAL) || sc & SCEXTERN)) {
- if (!(sc & SCEXTERN) && !d->defined && !d->tentative) {
+ } else if (sc & SCEXTERN) {
+ break;
+ } else if (d->linkage != LINKNONE && d->u.obj.storage == SDSTATIC) {
+ if (!d->defined && !d->tentative) {
d->tentative = true;
*tentativedefnsend = d;
tentativedefnsend = &d->next;