diff options
author | Michael Forney <mforney@mforney.org> | 2024-04-20 01:58:47 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2024-04-20 01:58:47 -0700 |
commit | 55263d181d28026a176729f7734dcd7558ae60f7 (patch) | |
tree | e9f8fcf55b7594b9e21f20cfbcda6a85f12152a5 /decl.c | |
parent | e0b5d82377932c6fc72a9eb567bc53eec0d9866d (diff) |
Style
Diffstat (limited to 'decl.c')
-rw-r--r-- | decl.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |