Closed GoogleCodeExporter closed 8 years ago
Interesting. Is that even legal C?
Original comment by zik.sale...@gmail.com
on 22 Feb 2011 at 11:12
I just checked it with gcc -pedantic. It says:
"warning: ISO C90 forbids specifying subobject to initialize"
Original comment by zik.sale...@gmail.com
on 22 Feb 2011 at 11:20
It seems it has been implemented later, most compilers supports it. I got no
idea if it was implemented in ANSI C or later in ISO C. However i though it
could be nice to see this in picoc.
Original comment by belli...@asiotec.org
on 23 Feb 2011 at 11:19
Designated Initialisers are a C99 feature, see e.g.
http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
If the picoc target is still C90, this would be an extension.
Original comment by DrZip...@gmail.com
on 13 Nov 2011 at 4:33
A simpler example of the issue:
int values[] = {1, 2, 3};
Error message: operator not expected here
Original comment by christop...@gmail.com
on 29 Aug 2012 at 2:14
Currently implementing array initialisers. Not going to implement designated
initialisers.
Original comment by zik.sale...@gmail.com
on 1 Sep 2012 at 7:25
Now supports array initialisers with the following forms:
int fred[3] = { 12, 34, 56 };
double joe[] = { 23.4, 56.7, 89.0 };
double jaz[] = { 23.4, 56.7, 89.0, };
Original comment by zik.sale...@gmail.com
on 6 Sep 2012 at 12:10
Original issue reported on code.google.com by
belli...@asiotec.org
on 22 Feb 2011 at 11:07