What is the story behind the removal of VLAs from C99 in later revisions?
IIRC, this macro was added to C11 along with a batch of other "these are optional" macros for atomics, complex, threads, etc. However, I don't recall whether C99 adopted the features as optional features and missed the feature testing macro, or if they were required features in C99 that we made optional in C11.
double (*a)[N][P] = (double (*)[N][P])a_flat;
for (i=0; i<M; i++)
for (j=0; j<N; j++)
for (k=0; k<P; k++)
a[i][j][k] = f(i, j, k);
The alternative would be a_flat[(i*M+j)*P+k] = f(i, j, k);
which is a lot more error-prone. I understand that some implementation (MSVC) declined to implement VLAs, but I really wish that at least VLA-pointers could have remained a mandatory part of C11 and later standards.[] Has there been any discussion of adding GCC's "typeof" to the standard?
Is a controverial feature, that can produce bugs, and are banned in a lot of project (one famouse, the Linux kernel).