cancel
Showing results for 
Search instead for 
Did you mean: 

Struct initialisation in Cosmic compiler

jro
Associate III
Posted on December 02, 2013 at 14:10

Hi there

I'm currently using the 32k Special EditionCosmic compiler for STM8, version 4.3.11. There seems to be partial support for C99 features, but there doesn't seem to be support for ''designated initialisers'' (see

http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

for example). I've found these really useful in the past  to ensure that my structures are correctly initialised even if I decide to add or re-order members. Positional initialisation is a bit of a maintenance nightmare, by comparison.

Does anyone know if (a) these are supported in the paid-for version, or (b) might be implemented soon?

Best regards

Jonathan
3 REPLIES 3
luca239955_stm1_st
Senior II
Posted on December 02, 2013 at 18:01

Hi,

I'm afraid there's no plan to support this feature in the short term.

Regards,

Luca (Cosmic)

jro
Associate III
Posted on December 03, 2013 at 11:00

Hi Luca

Thanks for the prompt reply. Pity about that, it really is very useful - please put it on the long-term list!

Best regards

Jonathan

shabbyx
Associate II
Posted on December 06, 2013 at 15:01

I would also greatly appreciate ''designated initializers''. It's a very important addition to C since C99.