> Package: g++-3.3
> Version: 1:3.3.3-6
> Severity: normal
> 
> When I use any integer constant number (e.g. '0') as an argument for
> fprintf command which is '%f' formatted, the output is broken - probably
> uninitialized value. When I use floating-point constant (e.g. '0.0'),
> everything works fine.

%f assumes double argument (8 bytes)
Passing integter value pushes only 4 byte to stack.
So yes, printf gets unitialized value.

It's a bug in the code, not in the compiler. Compiler can't do any 
type-checking for variable argument functions.

Well, gcc has some logic implemented specially for printf and company, 
maybe it should be fixed.



Reply via email to