aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/env.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-14 11:16:03 +0200
committerlemon <lsof@mailbox.org>2022-08-14 11:16:03 +0200
commit0d1e125832d0fd8ca31c5f782e7c3db774ae5a02 (patch)
treee4622f75a8307d8ee1970f8bd6cc92766582f0ba /bootstrap/env.c
parentc129f77ad724aa940b53a125de0e1e4de0ca7240 (diff)
woa
Diffstat (limited to 'bootstrap/env.c')
-rw-r--r--bootstrap/env.c4
1 files changed, 4 insertions, 0 deletions
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) {