Hi guys, for some reason even though I selected C99 mode in my target configuration, Keil insist on giving me "error: #70: incomplete type is not allowed". Since incomplete types are defined in C99, I would have guessed selecting it would prevent this error. Anybody know how to solve this issue, or is it just not allowed in Keil.
My struct looks something like this: typedef struct foo_s { uint8_t arr[]; } foo_t;
4.65 Flexible array members in C99
In a struct "with more than one member", the last member of the struct can have incomplete array type. Such a member is called a flexible array member of the struct.
... I would have guessed selecting it would prevent this error
You logic is flawed: that's like saying, "my car's speedometer goes up to 110, therefore I can drive it at 110"
As Robert noted they are defined - but they are only permitted in certain places.
Ah OK that clarifies things. Thanks allot dude!