This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in strtof
- From: "Qianli Zhang" <zhangql02 at mails dot tsinghua dot edu dot cn>
- To: <gcc-bugs at gcc dot gnu dot org>
- Date: Thu, 17 Nov 2005 10:38:32 +0800
- Subject: Bug in strtof
Dear Sirs,
Sorry to bother you. Recently I met with a problem in strtof, a sample program is like:
#include <stdio.h>
#include <stdlib.h>
main ()
{
float p = strtof ("-10", NULL);
printf ("-10 transform to %f\n", p);
}
In my up-to-date gentoo and debian system, gcc-3.3.6 and gcc-3.3.5 always output
-10 transform to -1054867456.000000
which is obviously wrong.
I am not sure where is the problem, gcc or glibc, thus I send the mail to you. Please forgive me if I have made any mistake.
Best regards,
Qianli Zhang