Mail Archives: djgpp-workers/1998/12/17/07:10:22
[Forwarded to djgpp-workers, from DJGPP newsgroup]
In article <x7n24nmqsn DOT fsf AT manatee DOT dms DOT auburn DOT edu> you wrote:
> strtod in 2.01 differs from that in Linux (gcc) and Solaris (Sun's cc)
This alone wouldn't mean much, of course, but unless I've read it
completely incorrectly, the ANSI spec seems to agree that there's a
problem, here. An 'E' alone, without any digits to follow it, is not
a valid exponent suffix, and thus strtod should leave it alone.
> #include <stdio.h>
> #include <stdlib.h>
> main() {
> char *p; double d;
> char buf[] = "2E";
> d = strtod(buf, &p);
> printf("%d\n", p-buf); }
> giving 2, rather than 1. This surfaced in a bug report on gawk, where
> the example
I don't have the necessary resources at hand to check wether this was
changed in 2.02. But if no-one else does it, I might jump in and fix
this.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -