diff --git a/src/fenv/feupdateenv.c b/src/fenv/feupdateenv.c index 50cef8e5ca9bef27801c7993aa08c634489aa80b..f45ed7c0141fa21b4e7504d939021507204d9f7e 100644 --- a/src/fenv/feupdateenv.c +++ b/src/fenv/feupdateenv.c @@ -2,6 +2,7 @@ int feupdateenv(const fenv_t *envp) { + #pragma STDC FENV_ACCESS ON int ex = fetestexcept(FE_ALL_EXCEPT); fesetenv(envp); feraiseexcept(ex); diff --git a/src/math/fma.c b/src/math/fma.c index 7076d4b9308fbf9b7a0c60801b347c1c5e6c4e40..17f1cdcc39bc2a7671b99dbeb7d107ee7973d505 100644 --- a/src/math/fma.c +++ b/src/math/fma.c @@ -89,6 +89,7 @@ static int getexp(long double x) double fma(double x, double y, double z) { + #pragma STDC FENV_ACCESS ON long double hi, lo1, lo2, xy; int round, ez, exy; @@ -306,6 +307,7 @@ static inline struct dd dd_mul(double a, double b) */ double fma(double x, double y, double z) { + #pragma STDC FENV_ACCESS ON double xs, ys, zs, adj; struct dd xy, r; int oround; diff --git a/src/math/fmaf.c b/src/math/fmaf.c index cc427fb5ac987b15cad113d02183145f7e3c1c68..a1c7f4f83df1e3bb0f6c67c37765345db5be4feb 100644 --- a/src/math/fmaf.c +++ b/src/math/fmaf.c @@ -37,6 +37,7 @@ */ float fmaf(float x, float y, float z) { + #pragma STDC FENV_ACCESS ON double xy, result; uint32_t hr, lr; diff --git a/src/math/fmal.c b/src/math/fmal.c index be64f145bbaeee42d5f29b63ce87f31251c15942..ccbe434d0eae6b883fc07e48bc3b5b79f9c971ff 100644 --- a/src/math/fmal.c +++ b/src/math/fmal.c @@ -162,6 +162,7 @@ static inline struct dd dd_mul(long double a, long double b) */ long double fmal(long double x, long double y, long double z) { + #pragma STDC FENV_ACCESS ON long double xs, ys, zs, adj; struct dd xy, r; int oround; diff --git a/src/math/llrintl.c b/src/math/llrintl.c index 32bb8b031be40c7c9a96fb643ad10eacaf473de7..3449f6f2b400944f64076270433144626d9eb4b5 100644 --- a/src/math/llrintl.c +++ b/src/math/llrintl.c @@ -18,6 +18,7 @@ raises inexact (with tonearest or upward rounding mode) */ long long llrintl(long double x) { + #pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); diff --git a/src/math/lrint.c b/src/math/lrint.c index 67091835a6d5050719938a32748a3927e741a457..bdca8b7cb82ec8b90ca9619e989dceb253b7ebc9 100644 --- a/src/math/lrint.c +++ b/src/math/lrint.c @@ -28,6 +28,7 @@ as a double. #if LONG_MAX < 1U<<53 && defined(FE_INEXACT) long lrint(double x) { + #pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); diff --git a/src/math/lrintl.c b/src/math/lrintl.c index 5eb1ba7edbb24b241b0ee2aa432618f8c029a0d1..b2a8106d7c6a1710eea10791fdf72d88df541d95 100644 --- a/src/math/lrintl.c +++ b/src/math/lrintl.c @@ -18,6 +18,7 @@ raises inexact (with tonearest or upward rounding mode) */ long lrintl(long double x) { + #pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); diff --git a/src/math/nearbyint.c b/src/math/nearbyint.c index 7a4c58cf5af64833c1460ca8772810aa19c16cda..f4e8aac4f0118d7d48d1d6a8e4af0fec048ee62a 100644 --- a/src/math/nearbyint.c +++ b/src/math/nearbyint.c @@ -6,6 +6,7 @@ double nearbyint(double x) { #ifdef FE_INEXACT + #pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); diff --git a/src/math/nearbyintf.c b/src/math/nearbyintf.c index 39c3d73b5edb3deac52d193196e34a66f00ab359..092e9ffae56e96b7d24003ea9d34adb9b4ea6e0d 100644 --- a/src/math/nearbyintf.c +++ b/src/math/nearbyintf.c @@ -4,6 +4,7 @@ float nearbyintf(float x) { #ifdef FE_INEXACT + #pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); diff --git a/src/math/nearbyintl.c b/src/math/nearbyintl.c index 0ff4b1f9e25ec4921ce9acae1495897ffeddf259..82852492f8108b875fa6c588af96aecf358475b9 100644 --- a/src/math/nearbyintl.c +++ b/src/math/nearbyintl.c @@ -11,6 +11,7 @@ long double nearbyintl(long double x) long double nearbyintl(long double x) { #ifdef FE_INEXACT + #pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT);