ref: ea60cdb464fe0bb4d289fb841304a44539d24593
parent: 6507bf31d345f0046a1415088e42390c8befdd97
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Oct 2 12:33:20 EDT 2015
Allow redefinition of externs. We don't want externs to conflict with their actual definition.
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -232,6 +232,10 @@
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 @@
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;
}