(2*3.14f)
has type float
. It is promoted to double
when passed to a variadic function, hence the reference to double
in the error message from GCC.
If you wish to display a float
converted to int
, use printf("%d", (int)…);
If you wish to display the bits of a float
as if it were an int
, use:
int i;
assert(sizeof(f) == sizeof(i));
memcpy(&i, &f, sizeof(f));
printf("%d", i);