3.2.3. Flexible array members

The last member of a struct can have an incomplete array type. The last member must not be the only member of the struct, otherwise the struct is zero in size.

Example

typedef struct
{
    int len;
    char p[]; // incomplete array type, for use in a malloced data structure
} str;

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential