int needfid[] = {
[Tversion] 0,
[Tflush] 0,
[Tauth] 0,
syntax means? Is this some Plan 9 extension, or is it just something I've never encountered?EDIT: I guess the value in the []'s is the array index to set the value of.
It's C99 (I also only saw it in C99 articles, never in production code). See http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Designated-Inits...
int needfid[] = {
[Tversion] = 0,
[Tflush] = 0,
It works for structs too: struct blah needfid = {
.version = 0,
.flush = 0, warning: use of GNU 'missing =' extension in designator
[-Wgnu-designator]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.