erichkeane wrote: > > There are currently over 200 separate unions using the work-around. > > Specifically, this is what Linux uses for getting C99 flexible arrays in > unions and alone in structs: > > ``` > #define DECLARE_FLEX_ARRAY(TYPE, NAME) \ > struct { \ > struct { } __empty_ ## NAME; \ > TYPE NAME[]; \ > } > ``` > > The conversion (over 6 years) from the "struct hack" to C99 flexible arrays > is complete, except for this wart.
That one ends up not being a problem, but presumably you are wanting to change that top-level 'struct' to be a 'union'? What is the problem with making it `TYPE NAME[0];` ? https://github.com/llvm/llvm-project/pull/84428 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits