This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCC library bug found
- To: "Andrew Makhorin" <mao at mai2 dot rcnet dot ru>, <bug-gcc at gnu dot org>
- Subject: Re: GCC library bug found
- From: "Tim Prince" <tprince at computer dot org>
- Date: Sun, 20 Aug 2000 23:50:25 -0700
- References: <000501c00b18$d392ae60$c06fbcd4@default>
This appears to be the bug with the formatting of a 0. result which has
been reported many times on the cygwin list and the newlib list, both of
which are more appropriate in this situation. If, by "GCC run-time
library" you mean libgcc2, no, that does not handle printf(); it is the
newlib library in this case.
Tim Prince
----- Original Message -----
From: "Andrew Makhorin" <mao@mai2.rcnet.ru>
To: <bug-gcc@gnu.org>
Sent: Sunday, August 20, 2000 7:35 PM
Subject: GCC library bug found
> I think that I have found a minor bug in the GCC run-time library.
>
> When I run the following program:
>
> /* test.c */
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(void)
> { double val = 0.0;
> printf("val = %17.9e \n", val);
> return 0;
> }
>
> /* eof */
>
> it prints the following line:
>
> val = 0. ?? e+00
>
> where ?? are some unprintable characters. In hex this line is:
>
> 76 61 6C 20 3D 20 20 20 30 2E 00 8D B6 00 00 00
> 00 00 00 65 2B 30 30 20 20 0A
>
> I should say that this bug sometimes doesn't appear (in other
programs,
> usually after several calls to the printf routine with other format
> strings).
>
> It is obvious that this bug sits in the print formatting routine due
to
> that zeros are printed in such inconvenient form.
>
> I use GCC 2.95.2 under Cygwin 1.1.2.
>
> Thank you,
>
> Andrew Makhorin,
> maintainer of GNU marst
>
>
>
>