In C99 and as far as I know in C89 as well an initializer for an object with static storage duration has to be either a constant expression or an string literal, from the draft C99 standard section 6.7.8 Initialization:
All the expressions in an initializer for an object that has static
storage duration shall be constant expressions or string literals.
and a function call is not a constant expression from section 6.6 Constant expressions which says (emphasis mine):
Constant expressions shall not contain assignment, increment,
decrement, function-call, or comma operators, except when they are
contained within a subexpression that is not evaluated.98)
gcc generates the same error using both -std=c99 and -std=c89, note I am also using the following flags -Wall -Wextra -pedantic.
In the modern versions of Visual Studio compiler this does not work in C(see it live) but in C++ this does work. So it may be that you are compiling it as C++ in Visual Studio.