This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]