[PATCH v4 2/3] Add default implementation of fenv.h and all methods

Joel Sherrill joel@rtems.org
Wed Aug 7 16:49:00 GMT 2019

On Wed, Aug 7, 2019 at 11:36 AM Joseph Myers <joseph@codesourcery.com>

> On Wed, 7 Aug 2019, Joel Sherrill wrote:
> >       The default implementation of the fenv.h methods return
> >       -EOPNOTSUPP.
> There are cases where it is not correct to return error status when no
> exceptions, rounding modes, etc. are supported.  For example,
> feraiseexcept (0) should (trivially) always succeed, and if there is no
> floating-point environment state, fegetenv and fesetenv should also
> trivially always succeed.  Is this implementation intended to be a valid
> default for soft-float-only architectures with no floating-point
> environment, or only as a deliberately nonfunctional version that all
> architectures, whether or not they have hardware floating point, are
> expected to replace?

Craig and  I were aiming for deliberately non-functional plus the
for the manual. The comments in the various implementation files indicate
they are non-functional.

If there are correct actions for the soft-float implementations, then that
would IMO be a separate pass by someone more familiar with those.

It would be great to push this and then you make those changes.


> --
> Joseph S. Myers
> joseph@codesourcery.com

More information about the Newlib mailing list