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]\]. |
...
Noncompliant Code Example
In this non-compliant noncompliant code, an array of size 1 is declared, but when the structure itself is instantiated, the size computed for malloc()
is modified to account for the actual size of the dynamic array. This is the syntax used by ISO C89.
...
Implementation Details
The non-compliant noncompliant example may be the only alternative for compilers that do not yet implement the C99 syntax. Microsoft Visual Studio 2005 does not implement the C99 syntax.
...