ref: 2c27e157e7fcdc82a6f010dd63d1ee433b86fe1d
parent: f4a4987fb85dc9ea146146068734988bb046a3ab
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Sep 26 09:28:23 EDT 2015
Make things that should be global global.
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -378,6 +378,7 @@
d = mkdecl($2->loc, mkname($2->loc, $2->id), mktyvar($2->loc));
d->decl.init = $4;
d->decl.isconst = 1;
+ d->decl.isglobl = 1;
lappend(&$$.nl, &$$.nn, d);
}
;
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -461,6 +461,7 @@
if (!dcl) {
dcl = mkdecl(Zloc, name, tyvoidfn);
dcl->decl.isconst = 1;
+ dcl->decl.isglobl = 1;
dcl->decl.isinit = 1;
dcl->decl.isextern = 1;
putdcl(file->file.globls, dcl);