aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-01 18:22:35 +0100
committerlemon <lsof@mailbox.org>2025-12-01 18:22:35 +0100
commit7135b43053b3edec3a2c0e3b3f2674581a599995 (patch)
tree11b945d2c978ed29d6a5545a527548efc202e65a
parenteb81938b26ae463e299bbf3c735cd0b2df2fae0d (diff)
c: edgecase for redeclaration of implicit sized array
-rw-r--r--c/c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/c.c b/c/c.c
index 5d72a5f..5dbce20 100644
--- a/c/c.c
+++ b/c/c.c
@@ -236,7 +236,7 @@ redeclarationok(const struct decl *old, const struct decl *new)
case SCEXTERN:
if (old->ty.t == TYARRAY && new->ty.t == TYARRAY
&& typechild(old->ty).bits == typechild(new->ty).bits
- && isincomplete(old->ty))
+ && (isincomplete(old->ty) || isincomplete(new->ty)))
{
return 1;
}