summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parse/stab.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/parse/stab.c b/parse/stab.c
index c2eedb5..47e06af 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -232,6 +232,10 @@ static int mergedecl(Node *old, Node *new)
old->decl.ishidden = old->decl.ishidden && new->decl.ishidden;
return 1;
}
+ if (old->decl.isextern || new->decl.isextern) {
+ old->decl.isextern = old->decl.isextern && new->decl.isextern;
+ return 1;
+ }
if (old->decl.vis == Visexport && new->decl.vis != Visexport) {
e = old;
g = new;
@@ -271,6 +275,7 @@ static int mergedecl(Node *old, Node *new)
old->decl.isexportinit = e->decl.isexportinit || g->decl.isexportinit;
old->decl.isglobl = e->decl.isglobl || g->decl.isglobl;
old->decl.ispkglocal = e->decl.ispkglocal || g->decl.ispkglocal;
+ old->decl.isextern = e->decl.isextern || g->decl.isextern;
return 1;
}