This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi all,
It seems that the 5.x cgtools for C2000 do not support C99 struct and union initialization like
union {
char birthday[9];
int age;
float weight;
} people = { .age = 14 };
This is quite handy as you do not have to initialize the whole struct/union.
I just want to get this confirmed and ask if there are plans to support this C99 feature!?
The TI compiler does not support this C99 feature. See http://tiexpressdsp.com/index.php/TI_Compilers_and_Industry_Standards for more on which standards TI compilers support. At this time, there are no plans to add support for this feature.
Thanks and regards,
-George
Okay, thanks for the answer.
That's too bad because other embedded compilers support C99 (gnu, atmel,...) and you really get used to these extended features.
Addition: The article does not seem to be complete regarding the supported C99 features - at least the _Pragma is supported in the newest compiler version.
TI compiler will support the union initialization by its members in the future release. For C2000, it is probably 5.3.x releases.
Although we do not support C99 officially. However, some of the C99 features are also part of GCC extensions. The union initialiazation by its members(Standard ANSI only allows initialization by union's first member) is part of GCC extensions. We do have plans to support GCC extension.
This feature is now implemented and it should be in the next major release.