summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-03-03 22:02:06 -0800
committerOri Bernstein <ori@eigenstate.org>2019-03-03 22:02:06 -0800
commita68e92f1e80f262e04d6e6c1d27af80199afbdc0 (patch)
tree4b26b77eaf00e970db02638c612d49f382003bc7
parentf5e054e36b30b4ef160f063c093be55e10585ed5 (diff)
downloadmc-a68e92f1e80f262e04d6e6c1d27af80199afbdc0.tar.gz
Don't set the env on typedef psuedodecls.
We want to specialize the args in the parent env.
-rw-r--r--parse/gram.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse/gram.y b/parse/gram.y
index 9fdfbf3..77d9f44 100644
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -1176,9 +1176,12 @@ mkpseudodecl(Srcloc l, Type *t)
{
static int nextpseudoid;
char buf[128];
+ Node *d;
bprintf(buf, 128, ".pdecl%d", nextpseudoid++);
- return mkdecl(l, mkname(l, buf), t);
+ d = mkdecl(l, mkname(l, buf), t);
+ d->decl.env = NULL;
+ return d;
}
static void