Wiki Markup |
---|
Flexible array members are a special type of array where the last element of a structure with more than one named member has an incomplete array type; that is, the size of the array is not specified explicitly within the structure. A variety of different syntaxes have been used for declaring flexible array members. For C99-compliant implementations, use the syntax guaranteed valid by C99 \[[ISO/IEC 9899-1999|AA. C References#ISO/IEC 9899-1999]\]. |
Non-Compliant Code Example
...
- The incomplete array type must be the last element within the structure.
- You There cannot have be an array of structures that contain flexible array members.
- Structures that contain a flexible array member cannot be used as a member in the middle of another structure.
- You cannot apply the The
sizeof
operator cannot be applied to a flexible array.
Risk Assessment
...