http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
--- Comment #11 from rickyrockrat 2011-10-12
17:40:25 UTC ---
Richard,
The original issue involved strtof, with -Wall enabled in the Makefile, and
stdlib.h included. That is the case that brought all this up, and that is the
case where it prints
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
Richard Guenther changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
--- Comment #9 from rickyrockrat 2011-10-11
19:38:51 UTC ---
One further note, with stdio.h, string.h and using strtod, I get the correct
answer suggested by Andreas Schwab:
Bug!!0.00E+00
If I put stdio.h, string.h, and stdlib.h, I get
Nobug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
--- Comment #8 from rickyrockrat 2011-10-11
19:33:47 UTC ---
Created attachment 25469
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25469
stdlib.h
Tar for string.h, stdlib.h, and stdio.h on the system.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
--- Comment #7 from rickyrockrat 2011-10-11
19:25:10 UTC ---
I removed the ','at the beginning of the string (which was not there in the
original test case), and I now get
Bug!!4.074850E+05
In any case, it should return 0, if +1.xxE-6 is an inv
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
rickyrockrat changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
Resolution|INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
--- Comment #5 from rickyrockrat 2011-10-11
19:05:28 UTC ---
>+1.0E-06," does not start with a valid
>floating point number and will always be parsed as 0.
I don't know what 'always will be', nor who exactly is doing the parsing, but
strtof
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
--- Comment #4 from Marc Glisse 2011-10-11
12:24:18 UTC ---
And anyway 10^-6 is not representable exactly as a double.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
--- Comment #3 from Andreas Schwab 2011-10-11 09:11:11
UTC ---
That won't help anyway since ",+1.0E-06," does not start with a valid
floating point number and will always be parsed as 0.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
--- Comment #2 from Richard Guenther 2011-10-11
08:58:45 UTC ---
And provide a prototype of strtof/strtod that does not return int.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50695
Richard Guenther changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|
11 matches
Mail list logo