Why does the following work just fine with gcc c99
int a[] = {1,2,3};
int b[sizeof a / sizeof *a] = {0};
But this gives compilation errors
int n = sizeof a / sizeof *a;
int b[n] = {0};
Error
file.c:14:2: error: variable-sized object may not be initialized
file.c:14:2: warning: excess elements in array initializer [enabled by default]
file.c:14:2: warning: (near initialization for 'b') [enabled by default]