View previous topic :: View next topic |
Author |
Message |
rikotech8
Joined: 10 Dec 2011 Posts: 376 Location: Sofiq,Bulgariq
|
CCS and (ANSI) C99 |
Posted: Sun Nov 01, 2015 12:59 am |
|
|
Quote: | CCS PCM C Compiler, Version 5.025, 5967 |
I know CCS does not completely cover the ANSI 99.
Just want to show another trait.
Code: | MY_TYPE a = { .flag = true, .value = 123, .stuff = 0.456 }; |
^^This^^ type of structure initialization is not allowed in CCS 5.025. Not sure for later versions. _________________ A person who never made a mistake never tried anything new. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19477
|
|
Posted: Sun Nov 01, 2015 4:53 am |
|
|
CCS does not attempt to get even close to C99. C90, yes. C99, no.
"Designated initializers" only appeared in C99, so it is not surprising that they don't work. I must admit I'm surprised that they haven't come along in CCS in the recent versions, since they can help ensure that values go where you want them (however 'beware' that every other value in the structure will also be initialised to the default when you initialise any value, so an explicit initialisation of all values is safer). |
|
|
|