In C (all variations, I believe) a const, ironically, is not a constant expression in C. In pre-C99, the lengths of the arrays must be a constant expression.
However, C99 has the concept of "variable length arrays", so if you are compiling with a compiler compatible with C99, your code must be valid, although BUF_SIZEit is not a constant expression.
source
share