John,
Yes, it used to work - except maybe for a brief period in some beta, a few versions back, when I tried to add this check the last time.
At least in your example it's possible to put the array in a new block (scope):
/* new block */
{
int indexs[nItems];
...
}
My copy of the C99 standard contains the following example, which may be open to some interpretation:
EXAMPLE 2 A goto statement is not allowed to jump past any declarations of objects with variably
modified types. A jump within the scope, however, is permitted.
goto lab3; // invalid: going INTO scope of VLA.
{
double a[n];
a[j] = 4.4;
lab3:
a[j] = 3.3;
goto lab4; // valid: going WITHIN scope of VLA.
a[j] = 5.5;
lab4:
a[j] = 6.6;
}
goto lab4; // invalid: going INTO scope of VLA.