On Thu, 23 Feb 2023, Qing Zhao via Gcc-patches wrote:

> But the following:
> 
> struct flex1  { int length1; char data1[]; };
> struct flex2  { int length2; char data2[]; };
> union union_flex { struct flex1 f1; struct flex2 f2; };  /* this is C 
> standard.  */
> 
> struct out_flex { int n; union union_flex flex_data1;};  /* this is GNU 
> extension.  */
> 
> Should add this item into the documentation?

"union that contains a structure with a flexible array member" is just 
like "structure with a flexible array member".  I suppose the 
documentation should try to make that clear, without repeating it too much 
for every separate case.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to