Richard Biener wrote:
> Should we also get the __ieee764_ entries used if the compiler sets
> __NO_MATH_ERRNO__?  That is, if the librari advertises not setting errno
> via math_errhandling is it still allowed to set/clobber errno anyways?

That's a good question! I checked and the math wrappers currently use
__FINITE_MATH_ONLY__ to decide whether to use the IEEE754 version
or the wrapper which sets errno. However that's actually incorrect given
that the only purpose of the wrappers is to set errno, not to add IEEE
handling (which is done in the math implementation).

Note -ffinite-math-only appears to imply -fno-math-errno, eventhough
this is not clear from the documentation - is that expected? In principle
these options are orthogonal, setting errno due to a range error is still
valid even if you don't use infinities or NaNs.

Wilco

Reply via email to