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[].
To answer my own question...
The switch is --gnu. It activates all kinds of GCC extensions. It does not explicitly say that nested empty arrays are allowed but the error goes a way when --gnu is activated for the project.
infocenter.arm.com/.../index.jsp