aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/c.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/c.c b/src/c.c
index 73a03cb..6201812 100644
--- a/src/c.c
+++ b/src/c.c
@@ -2080,8 +2080,10 @@ buildagg(CComp *cm, enum typetag tt, internstr name, int id)
td.anyconst |= decl.qual & QCONST;
if (isagg(decl.ty)) {
td.anyconst |= typedata[decl.ty.dat].anyconst;
- if (typedata[decl.ty.dat].flexi && !isunion)
- error(&decl.span, "nested aggregate has flexible array member");
+ if (typedata[decl.ty.dat].flexi && !isunion) {
+ td.flexi = 1;
+ flexspan = decl.span;
+ }
}
if (isunion) {
td.siz = td.siz < siz ? siz : td.siz;