aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2024-04-20 01:58:47 -0700
committerMichael Forney <mforney@mforney.org>2024-04-20 01:58:47 -0700
commit55263d181d28026a176729f7734dcd7558ae60f7 (patch)
treee9f8fcf55b7594b9e21f20cfbcda6a85f12152a5 /decl.c
parente0b5d82377932c6fc72a9eb567bc53eec0d9866d (diff)
Style
Diffstat (limited to 'decl.c')
-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;