This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: other/5752: Zeros not displayed as significant figures
- From: jakub at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, warren at eng dot up dot ac dot za
- Date: 22 Feb 2002 21:31:56 -0000
- Subject: Re: other/5752: Zeros not displayed as significant figures
- Reply-to: jakub at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, warren at eng dot up dot ac dot za, gcc-gnats at gcc dot gnu dot org
Synopsis: Zeros not displayed as significant figures
State-Changed-From-To: open->closed
State-Changed-By: jakub
State-Changed-When: Fri Feb 22 13:31:54 2002
State-Changed-Why:
This has nothing to do with gcc, printf is in libc.
But glibc does the right thing, just read some standard
covering printf (be it ISO C99 or Unix98).
E.g. http://www.opengroup.org/onlinepubs/007908799/xsh/fprintf.html
sais about %g:
Trailing zeros are removed from the fractional portion of the result; a radix character appears only if it is followed by a digit.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5752