Josip Josip - 3 months ago 33
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?


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.