diff options
| author | 2022-08-13 13:00:37 +0200 | |
|---|---|---|
| committer | 2022-08-13 13:00:37 +0200 | |
| commit | a4ddca68662f4bc0531763357b4bc00b6c50b456 (patch) | |
| tree | 97f83407da049732ec97dd2d32ee34e0cd3c8c0f /bootstrap/env.c | |
| parent | 5b95abb249604e7df9be1d63b1f3dc85b8f5990b (diff) | |
target
Diffstat (limited to 'bootstrap/env.c')
| -rw-r--r-- | bootstrap/env.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bootstrap/env.c b/bootstrap/env.c index ff2929f..40392b9 100644 --- a/bootstrap/env.c +++ b/bootstrap/env.c @@ -33,6 +33,9 @@ envput(struct env *env, const struct decl *decl) { if ((d0 = envfind(&env_noparent, INT_MAX, decl->name))) { // modify existing forward declarations? + if (decl->t != d0->t) + return NULL; + if (decl == d0 || !memcmp(d0, decl, sizeof *d0)) return d0; if (d0->t == Ddef && decl->t == Ddef && !memcmp(&d0->var, &decl->var, sizeof d0->var)) |