Compiers usually emit warnings or errors in this case, e.g. GCC says:
program.c:4: warning: initialization from incompatible pointer type
Intel C Compiler is more verbose:
program.c(4): warning #144: a value of type "void (*)(int)" cannot be used to initialize an entity of type "void (*)(float)"
void (*foo)(float)=f;
^
Besides possible conversion of argument value 10 to floating point, there is another option if you are running on a 64-bit machine - calling convention. Integer arguments are passed through the regular integer CPU registers (RDI, RSI, etc.) while floating-point arguments are passed in the SSE registers (XMM0, XMM1, etc.). Even if somehow the floating point value was compatible with the integer one, the called function will receive its argument in different register (XMM0) than the one it will consult for the value (RDI).
On a 32-bit machine both integer and floating point arguments are passed on the stack. What you end up with is 1092616192 which is just 10.0 in IEEE 754 single-precision floating point representation:
1092616192 = 0|10000010|01000000000000000000000
| | |
| | +---> significand = 1 + 2^(-2) = 1.25
| |
| +------------> exponent = 130 - 127 = +3
|
+--------------> sign = 0 (positive)
1.25 * 2^3 = 1.25 * 8 = 10.0