diff options
Diffstat (limited to 'bootstrap/cgen.c')
| -rw-r--r-- | bootstrap/cgen.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bootstrap/cgen.c b/bootstrap/cgen.c index 9fa954c..8a01e09 100644 --- a/bootstrap/cgen.c +++ b/bootstrap/cgen.c @@ -554,10 +554,11 @@ defctype(const struct type *ty, void *_) { defctype(ty->child, NULL); break; case TYarr: - assert(ty->length >= 0); - defctype(ty->child, NULL); - *cname = xasprintf("__ty%d", id++); - pri("typedef %t %s[%U];\n", ty->child, *cname, ty->length); + if (ty->length >= 0) { + defctype(ty->child, NULL); + *cname = xasprintf("__ty%d", id++); + pri("typedef %t %s[%U];\n", ty->child, *cname, ty->length); + } break; case TYslice: defctype(ty->child, NULL); |