From 0d1e125832d0fd8ca31c5f782e7c3db774ae5a02 Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 14 Aug 2022 11:16:03 +0200 Subject: woa --- bootstrap/env.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bootstrap/env.c') diff --git a/bootstrap/env.c b/bootstrap/env.c index 40392b9..21d9580 100644 --- a/bootstrap/env.c +++ b/bootstrap/env.c @@ -42,6 +42,10 @@ envput(struct env *env, const struct decl *decl) { return d0; if (d0->t == Dmacro && !memcmp(&decl->macro, &d0->macro, sizeof decl->macro)) return d0; + if (d0->t == Dtype && d0->ty == decl->ty) + return d0; + if (d0->t == Dfn && !memcmp(&decl->fn, &d0->fn, sizeof decl->fn)) + return d0; if (d0->t == Dtepl && !memcmp(&decl->tepl, &d0->tepl, sizeof decl->tepl)) return d0; for (int kind = TYstruct; kind <= TYeunion; ++kind) { -- cgit v1.2.3