This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] patch for pr12839 / F2003 format of Inf and NaN
- From: Roger Sayle <roger at eyesopen dot com>
- To: Bud Davis <bdavis at gcc dot gnu dot org>
- Cc: Paul Brook <paul at codesourcery dot com>, gfortran <fortran at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 27 Jun 2004 10:49:26 -0600 (MDT)
- Subject: Re: [gfortran] patch for pr12839 / F2003 format of Inf and NaN
On Sun, 27 Jun 2004, Bud Davis wrote:
> On Sat, 2004-06-26 at 12:51, Tobias Schlüter wrote:
> steven B. had a question; "Does this work on non-IEEE float targets?"
> which probably matters, but i cannot answer ( i have no clue..).
>
> since BSD is not going to change the C library for us, we will have
> to do something...
I agree that your patch is the correct solution to this problem, and
is an improvement over the current implementation that relies on
platform-specific behaviour of "isinf". Even on non-IEEE platforms
signbit, should return whether the a value is negative or not (on
non-IEEE platforms without signed zeros or NaNs, this will often be
equivalent to "x < 0.0"). And on other non-IEEE platforms, "isinf"
may always return zero anyway.
I'll try to ensure that we support the stricter-than-C99 "signbit"
semantics if we ever add support for "isinf" as a GCC built-in.
Roger
--