[gfortran,patch] -ffpe-trap library support for SysV
FX Coudert
fxcoudert@gmail.com
Thu Oct 13 21:46:00 GMT 2005
>>What I wanted to say is: there's no C99 way to ask for a FPE to be
>>raised on individually selected exceptions. That is, there is no C99 way
>>to do:
>>
>> float x;
>> raise_fpe_on_ieee_exception(EXCEPTION_INVALID);
>> x = -2;
>> x = sqrt(x); // This raises a FPE
>
> FYI (you probably already know this), glibc does offer this
> functionality: feenableexcept and fedisableexcept. If there's really
> no C99 way to accomplish the same thing, perhaps FreeBSD should adopt
> that?
Yes, feenableexcept/fedisableexcept are already used in libgfortran when
available.
As for FreeBSD, I guess they should work on a way to do this, apart from
assembler :-)
FX
More information about the Fortran
mailing list