This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Initialization of nested flexible array members


Hi Alexandre,

Declare your stretchy-buffered struct this way:

typedef struct
{
    char a;
    char b;
    int flexo[1024];
} EnclosedStruct;

Instead of "1024", use whatever largest possible size the struct could conceivably need to accommodate.

HTH,
--Eljay



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]