BUG: printf suppress zeros of a decimal number

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu May 5 07:58:15 UTC 2011


On Wed, May 04, 2011 at 10:22:01PM +0200, Stefani Seibold wrote:
>Am Mittwoch, den 04.05.2011, 10:30 +0200 schrieb Bernhard
>Reutner-Fischer:
>> On Wed, May 04, 2011 at 09:22:13AM +0200, Bernhard Reutner-Fischer wrote:
>> >> binutils-2.21
>> >> gcc-4.5.2
>> >> uClibc-0.9.32-rc3
>> >> cloog-ppl-0.15.10
>> >> gmp-5.0.1
>> >> linux-2.6.35.10
>> >> mpc-0.8.2
>> >> mpfr-3.0.0
>> >> ppl-0.11
>> >>
>> >> I build with cross-tool ng v1.10.1 some cross compilers for
>> >> uClib-0.9.32-rc3 and  eglibc-2_12 for x86, powerpc and arm. The eglibc
>> >> compiled example works as expected and the uClibc code shows the error
>> >> independent of the architecture.
>> >
>> >Can you check against current master please?
>> 
>> I now see you use the old vfprintf, don't do that or submit patches.
>> 
>
>Thanks, you solved my problem. old vprintf is buggy!

Well, it depends on your view.
If you compile _fp_out_narrow() with anything but O0 then it fails but
works as expected with O0.

Compile everything with -O0 and just _fp_out_narrow with -O1, like:
static attribute_optimize("O1") void _fp_out_narrow(

and see how it goes up in flame. Sounds a bit like a compiler bug to me.

But old_vfprintf is not that widely used anyway (i did a few cosmetic
improvements in the evening and will eventually check them in) so do not
use it for now..


More information about the uClibc mailing list