Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: A couple editorial questions/notes on this section. I only cited the C99 reference on the first occurrence--it seemed excessive to include it on every reference. Not sure what we've been doing on this point. Also, it seems like there should be a reference list entry for ISO C89 (if there is, it was apparent to me). Finally, regarding my edits to the numbered list, I've committed editorial heresy: converting active voice to passive voice. I did this because the passive voice is used so pervasively in this text that the switch to the active voice seemed out of place, and I was instructed that reworking the text to the active voice is beyond the scope of this edit. Ed.

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

...

  1. The incomplete array type must be the last element within the structure.
  2. You There cannot have be an array of structures that contain flexible array members.
  3. Structures that contain a flexible array member cannot be used as a member in the middle of another structure.
  4. You cannot apply the The sizeof operator cannot be applied to a flexible array.

Risk Assessment

...