Your code is not legal C.
If your compiler compiles it without a diagnostic,
your compiler is not a C compiler
You must use constants to initialize a variable.
In your code, the initializer expression ( i + 1
) is not a constant.
This violates 6.7.8/4:
All the expressions in an initializer [...] shall be constant expressions or string literals.