3 ms·
That's right, it's a designated initializer, except the standard c99 way requires an =. gcc didn't/doesn't but that's nonstandard. So it is an extension, just n
by glurgh 13y ago
That's right, it's a designated initializer, except the standard c99 way requires an =. gcc didn't/doesn't but that's nonstandard. So it is an extension, just not a plan9 one - a gcc-ism. clang's error/warning, as usual, is very helpful so it's worth it just to try clang when running into weirdness like that:
warning: use of GNU 'missing =' extension in designator
[-Wgnu-designator]
- aap_ 13y agoWell, it is a Plan 9 extension. You made it sound like it was only a gcc extension.
- glurgh 13y agoYou're right, it's described in 3.5 of http://plan9.bell-labs.com/sys/doc/compiler.html http://plan9.bell-labs.com/sys/doc/compiler.html It seems like it was contemporaneous with the proposed c90 extension and also supported the = except optionally. But it was definitely something in the plan 9 compiler rather than only a gcc thing.