Hello Eric, Eric Blake wrote: > ... cut for clarity ...
>> test-strtod.c:762: assertion failed >> { >> const char input[] = "0x1p"; >> char *ptr; >> double result; >> errno = 0; >> result = strtod (input, &ptr); >> ASSERT (result == 1.0); >> ASSERT (ptr == input + 3); <- fail >> ASSERT (errno == 0); >> } >> > And yet another problem, but I'm guessing here as I don't have your > debugger output. I'm guessing it parsed "0x1p" instead of "0x1" - the p > must not be parsed if there is no exponent. > > oops, I forgot to add this. (dbx) where raise(??) at 0xd0120f40 abort() at 0xd016d9e4 unnamed block in main(), line 762 in "test-strtod.c" main(), line 762 in "test-strtod.c" (dbx) print ptr "" (dbx) print *ptr '\0' (dbx) print result 1.0 (dbx) print input "0x1p" (dbx) Bye Rainer