Portability of idiom

Benjamin Kosnik bkoz@redhat.com
Wed Jan 30 11:51:00 GMT 2002


>   double __d = strtod(__s, &__sanity);
>   if (__sanity != __s && *__sanity == '\0' && errno == 0)

More compelling reasons as to why this bit of code should not depend on 
strtod... oh well. 

> I have passed this issue along to David O'Brien but in the interest of
> general GCC portability, I wonder if we couldn't revise the error
> checking idiom used to only look for the errno settings documented by
> the standard.  

Definitely.

> FYI, this issue is why these tests started failing both
> mainline and 3.0.X branch on FreeBSD 5.0 machines:
> 
>   FAIL: 26_numerics/complex_inserters_extractors.cc execution test
>   FAIL: 27_io/istream_sentry.cc execution test

Cool let's fix this up!



More information about the Libstdc++ mailing list