Josip Josip - 1 year ago 113
C Question

Static keyword in function parameter

I've just found this function definition in some embedded code:

float round_float_to_4(static float inputval);

I'm familiar with other uses for static (global variables, functions and local variables), but this is the first time I see it as specifier for function parameter. I assume that this forces compiler to use fixed memory location for inputval instead of stack?

Answer Source

This is non standard. I'd guess the same thing as you, and I'm not surprised of such extension in compilers having an embedded target.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download