Hi All,
A co-worker of mine was just showing me a C construct that neither of us
have ever seen before.
Here it is:
int myArray [10] = { [0 … 9] = 47 };
This is a slightly simplified version of what we actually saw. What we saw
was initializing an array of structures of interrupt handlers vectors. It
came from a Linux system. Now it’s fairly obvious what the intent is. And
we’re all wanted to do something like this before. But I didn’t think that
this was legal C. For the record, it does compile under the Linux gcc but
not under the QNX Watcom compiler.
Does anyone know if this is a new language feature or just some gcc
extension to the language and when it was introduced?