What results do you get if your printf format specifiers match the
actual
data type being passed in...
double - %lf
Plain %f means double, too -- all "float" are
promoted to "double" when passed to a varargs
function.
unsigned long - %lu or %lx
Doesn't matter on his platform (ARM); although
of course it _is_ incorrect to say %x instead
of %lx, it doesn't change the result.
It looks like there is a bug in the soft float
library. Harald, look at the generated assembler
code (compile with -S instead of -c) to find out
what's going on, to see why -O3 works.
Segher