diff options
| author | 2026-04-14 21:59:46 +0200 | |
|---|---|---|
| committer | 2026-04-14 22:20:33 +0200 | |
| commit | 35efb4b54b6a8252b30ec32bc23ed34f15a95e5c (patch) | |
| tree | de9d0170ed868a5d77ff748c4c1c09eb35ecfb27 /src | |
| parent | 93f08f8d3095b8d66712c6bf33977d930a63456f (diff) | |
c: allow nested aggregate with flexible array member
Diffstat (limited to 'src')
| -rw-r--r-- | src/c.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |