Notice: We have migrated to GitLab launching 2024-05-01 see here:

#2971 closed defect (fixed)

Add fenv.h to newlib

Reported by: Joel Sherrill Owned by: Needs Funding
Priority: normal Milestone: 6.1
Component: unspecified Version:
Severity: normal Keywords: POSIX-Compliance
Cc: Blocked By:

Description (last modified by Joel Sherrill)

fenv.h is not present.

  • feclearexcept, fegetenv, fegetexceptflag, fegetround, feholdexcept, feraiseexcept, fesetenv, fesetexceptflag, fesetround, fetestexcept, feupdateenv
  • Cygwin has x86 implementation. FreeBSD should be source for ARM and some other architectures. The implementation is architecture specific.

When completed, see psxtests/ and enable the fenv.h POSIX API Compliance Tests.

Change History (6)

comment:1 Changed on 04/03/17 at 23:54:51 by Joel Sherrill

Keywords: POSIX-Compliance added

comment:2 Changed on 03/16/18 at 18:37:28 by Joel Sherrill

Summary: Add fenv,h to newlibAdd fenv.h to newlib

comment:3 Changed on 12/06/18 at 15:34:17 by Joel Sherrill

Description: modified (diff)
Owner: set to Needs Funding
Status: newassigned
Version: 5

comment:4 Changed on 12/06/18 at 15:34:31 by ABR290B <abhimanyuraghuvanshi29@…>

In [changeset:"da2621649ca002941c77295402b9052e128487ad/rtems" da262164/rtems]:

POSIX Signature Test for fenv.h (GCI 2018)

Updates #2971.

comment:5 Changed on 06/06/20 at 20:36:54 by Eshan dhawan <eshandhawan51@…>

In [changeset:"e84587355a64152b8cd6ae748ac88d8c75447b51/rtems" e845873/rtems]:

tests for fenv.h functions

added tests for fesetexeptflag(), fegetexeptflag(),
fegetround(), fesetround().

In the test fegetround() does not return any flag
other then FE_TONEAREST in tests.
This is probably due to soft float.

The test complies successfully and returns assert
at fegetround()

Other tests run without any errors
tested on RISCV/rv32imac

The test prints nothing if runs successfully.

updates #2971

Signed-off-by: Eshan dhawan <eshandhawan51@…>

comment:6 Changed on 12/03/21 at 20:16:07 by Joel Sherrill

Milestone: Indefinite6.1
Resolution: fixed
Status: assignedclosed

fenv.h has been added to newlib for many architectures.

Note: See TracTickets for help on using tickets.