Re: #pragma STDC FENV_ACCESS ON

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Wed, 17 Jul 2024 20:26:57 UTC
On Wed, Jul 17, 2024 at 04:16:33PM -0400, enh wrote:
> On Wed, Jul 17, 2024 at 4:01 PM Steve Kargl
> <sgk@troutmask.apl.washington.edu> wrote:
> >
> > On Wed, Jul 17, 2024 at 01:30:39PM -0400, enh wrote:
> > > i see lib/msun/src/e_sqrtl.c has `#pragma STDC FENV_ACCESS ON`, but
> > > s_fma.c, s_fmaf.c, s_fmal.c, and s_nearbyint.c all use fesetround() or
> > > fesetenv() too --- shouldn't they also have the pragma?
> > >
> > > (Android currently builds all of libm with that pragma, but (a) that
> > > seems like a big hammer and (b) afaict upstream [you] don't, so this
> > > is potentially causing problems^W^Wallowing the compiler to cause
> > > problems for you?)
> >
> > Some of the compilers, which that are used to compile FreeBSD,
> > do not support "#pragma STDC FENV_ACCESS ON".
> 
> that's why you have a line in the Makefile to quiet the warning :-)
> 
> (remember you _do_ have this #pragma in e_sqrtl.c already.)
> 

Then your original post is simply a rhetorical question?

Consider it future-proofing for when all compilers supprt
the pragma.

-- 
Steve