Re: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Jeff Johnston
Jeff Johnston wrote: Corinna Vinschen wrote: Jeff, On Feb 27 12:13, Jeff Johnston wrote: Gabriel Dos Reis wrote: yes, isnan and friends are supposed to be macros only, not functions. I'll start working on a newlib patch for this. while you're at it, please do *not* remove the isnan

Re: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Gabriel Dos Reis
"Dave Korn" <[EMAIL PROTECTED]> writes: [...] | >> OTOH it may be that libstdc++ was only supposed to be shadowing those | >> ctype macros that are guaranteed to have underlying function | >> implementations; I don't know what the shadowing is for, so I can't | >> comment. | > | > libstdc++ i

Re: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Gregory Pietsch
Dave Korn wrote: On 27 February 2006 14:40, Thomas Sailer wrote: When I try to call std::isnan(double) from a program compiled with g++ 3.4.4, the program gets into an endless loop. The problem is that gcc compiles __gnu_cxx::isnan(double) as a tail call to __gnu_cxx::__capture_isnan(double

Re: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Jeff Johnston
Corinna Vinschen wrote: Jeff, On Feb 27 12:13, Jeff Johnston wrote: Gabriel Dos Reis wrote: yes, isnan and friends are supposed to be macros only, not functions. I'll start working on a newlib patch for this. while you're at it, please do *not* remove the isnan function implementation.

RE: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Dave Korn
On 27 February 2006 17:13, Jeff Johnston wrote: > Gabriel Dos Reis wrote: >> "Dave Korn" <[EMAIL PROTECTED]> writes: >> >> [...] >> >>> It looks to me like the cygwin/newlib combination is not being >>> compliant if it implements isnan as a function rather than a macro. I >>> couldn't see any

Re: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Corinna Vinschen
Jeff, On Feb 27 12:13, Jeff Johnston wrote: > Gabriel Dos Reis wrote: > >yes, isnan and friends are supposed to be macros only, not functions. > > I'll start working on a newlib patch for this. while you're at it, please do *not* remove the isnan function implementation. It's still required to

RE: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Dave Korn
On 27 February 2006 17:00, [EMAIL PROTECTED] wrote: > "Dave Korn" <[EMAIL PROTECTED]> writes: > > [...] > >> It looks to me like the cygwin/newlib combination is not being compliant >> if it implements isnan as a function rather than a macro. I couldn't see >> anything in the standard that sa

Re: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Jeff Johnston
Gabriel Dos Reis wrote: "Dave Korn" <[EMAIL PROTECTED]> writes: [...] | It looks to me like the cygwin/newlib combination is not being compliant if | it implements isnan as a function rather than a macro. I couldn't see | anything in the standard that says it can be a function, and every ref

Re: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Gabriel Dos Reis
"Dave Korn" <[EMAIL PROTECTED]> writes: [...] | It looks to me like the cygwin/newlib combination is not being compliant if | it implements isnan as a function rather than a macro. I couldn't see | anything in the standard that says it can be a function, and every reference | to it describes i

RE: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Dave Korn
On 27 February 2006 14:40, Thomas Sailer wrote: > When I try to call std::isnan(double) from a program compiled with g++ > 3.4.4, the program gets into an endless loop. > > The problem is that gcc compiles > __gnu_cxx::isnan(double) as a tail call to > __gnu_cxx::__capture_isnan(double), and it c

gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop

2006-02-27 Thread Thomas Sailer
When I try to call std::isnan(double) from a program compiled with g++ 3.4.4, the program gets into an endless loop. The problem is that gcc compiles __gnu_cxx::isnan(double) as a tail call to __gnu_cxx::__capture_isnan(double), and it compiles __gnu_cxx::__capture_isnan(double) to __gnu_cxx::isna