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

Howland, Craig D. - US via newlib newlib@sourceware.org
Thu Aug 1 17:30:00 GMT 2019

> From: newlib-owner@sourceware.org <newlib-owner@sourceware.org> on behalf of Joel Sherrill <joel@rtems.org>
> Sent: Thursday, August 1, 2019 12:30 PM
> To: Howland, Craig D. - US
> Cc: newlib@sourceware.org
> Subject: Re: [PATCH 2/3] Add default implementation of fenv.h and all methods
> On Wed, Jul 31, 2019 at 6:58 PM Howland, Craig D. - US via newlib <
> newlib@sourceware.org> wrote:
> > The RISC-V-specific things would probably be best removed from
> > libc/include/sys/fenv.h, leaving the original one in machine (unlike the
> > primary fenv.h, which will no longer need to be under machine, as you
> > noted.)  At a glance, using shorthand:
> > -#define FE_TONEAREST_MM 0x00000004
> > -#define FE_RMODE_MASK   0x7
> > (Put another way, it should only have the bare-bones items defined in C
> > and POSIX.)
> >
> Thanks. I hadn't reviewed it against C/POSIX yet and should have.
> Do you think there should be comments about constants and types in the
> default sys/fenv.h or just a blanket, this is the POSIX minimum that a port
> has to define
> I honestly was worried the structure of this work or the regenerated stuff
> would be awfully broken. I am thrilled to get meaty technical comments.
     I did check the fenv.h and sys/fenv.h against POSIX.
     It certainly would be nice for sys/fenv.h to at a minimum point to POSIX 
for people to look up easily, and perhaps even better to also have a quick 
summary of what it wants, since it's intended as a template.

More information about the Newlib mailing list