Skip to main content
Visitor II
December 2, 2013
Question

Struct initialisation in Cosmic compiler

  • December 2, 2013
  • 3 replies
  • 1066 views
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
    This topic has been closed for replies.

    3 replies

    Visitor II
    December 2, 2013
    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)

    jroAuthor
    Visitor II
    December 3, 2013
    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

    Visitor II
    December 6, 2013
    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.