That code snippet is not legal in ANSI C 89.
It is legal in C++, and when using C++ the starcore compiler does accept it, so the point is not if it is difficult to implement (I would actually say so, but its done already), but what the language supports. That other compilers do support this as C language extension does not change the language :smileywink:.
If you want to use C, I would suggest that you adapt your source code. I'm sure MSVC will still compile it. Using C++ just for global initialization seems a bit too much for me.
Daniel
PS: I did not check C99, not sure what is supported in this C dialect.
PPS: Does a/b really has to be a variable? I wonder what the real code is using the global initializatio
n for.
(Not tested
enum {a=0, b=0};
int arr[] =
{
a, b
};