diff options
| author | 2025-10-15 10:05:01 +0200 | |
|---|---|---|
| committer | 2025-10-15 10:05:01 +0200 | |
| commit | 2c5c8f3bca082c0822a9b2a247689b882980cc47 (patch) | |
| tree | 921087ff864019069cb59d175bbe8d5de136a96f /c.c | |
| parent | b0413b4978698d964c381777b7b95d79d0fbd25f (diff) | |
c: redeclaration ok when old was unspecified length array
Diffstat (limited to 'c.c')
| -rw-r--r-- | c.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -207,6 +207,13 @@ redeclarationok(const struct decl *old, const struct decl *new) break; /*fallthru*/ case SCEXTERN: + if (old->ty.t == TYARRAY && new->ty.t == TYARRAY + && typechild(old->ty).bits == typechild(new->ty).bits + && isincomplete(old->ty)) + { + return 1; + } + /*fallthru*/ case SCTYPEDEF: return old->ty.bits == new->ty.bits; } |