aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--c.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/c.c b/c.c
index 8109a9b..0f4c0f1 100644
--- a/c.c
+++ b/c.c
@@ -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;
}