This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]