Initialize array with extra element using a macro
If you don't specify the size on the array but let it be auto-deduced, you can just add the 0 in the front conditionally:
const int v[] = {
# if feature_enabled
0,
#endif
1, 2, 3, 4
};
If you need to keep the array size, then:
# if feature_enabled
const int v[4] = {
#else
const int v[5] = {0,
#endif
1, 2, 3, 4
};