This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Empty arrays in nested structures

I am porting code from ew and gcc to keil uvision arm compiler (Arm compiler 5.06 update 1 build 61).

Both ew and gcc allow me to the following:

struct header
{
    uint32_t chksum;
    uint8_t id;
    uint8_t size;   /* This many bytes follow immediately */
    uint8_t payload[]; /* Allows for easy access to the payload of variable size packets */
}

struct datapacket
{
    struct header header;
    uint64_t timestamp;
    uint8_t data[];
}

Is it possible to something similar with the arm compiler?
I have enabled the C99 option which allows for empty array declaration but it does not seem to accept that the header has the empty array member payload[].