From b391230bb97ec1fcf0803bbbab5fe8b30870c4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 10 Jan 2025 00:02:16 +0000 Subject: [PATCH] Initialize all `fenv_t` with `__fe_dfl_env` --- src/e_sqrtl.c | 2 +- src/s_lrint.c | 2 +- src/s_nearbyint.c | 2 +- src/s_rintl.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/e_sqrtl.c b/src/e_sqrtl.c index a073bf9f..a2fe34e7 100644 --- a/src/e_sqrtl.c +++ b/src/e_sqrtl.c @@ -81,7 +81,7 @@ sqrtl(long double x) union IEEEl2bits u; int k, r; long double lo, xn; - fenv_t env; + fenv_t env = __fe_dfl_env; u.e = x; diff --git a/src/s_lrint.c b/src/s_lrint.c index e1c55464..754ef3a1 100644 --- a/src/s_lrint.c +++ b/src/s_lrint.c @@ -49,7 +49,7 @@ OLM_DLLEXPORT dtype fn(type x) { - fenv_t env; + fenv_t env = __fe_dfl_env; dtype d; feholdexcept(&env); diff --git a/src/s_nearbyint.c b/src/s_nearbyint.c index 95162a54..fbf482fc 100644 --- a/src/s_nearbyint.c +++ b/src/s_nearbyint.c @@ -44,7 +44,7 @@ OLM_DLLEXPORT type \ fn(type x) \ { \ type ret; \ - fenv_t env; \ + fenv_t env = __fe_dfl_env; \ \ fegetenv(&env); \ ret = rint(x); \ diff --git a/src/s_rintl.c b/src/s_rintl.c index d20768ee..2beeb9ab 100644 --- a/src/s_rintl.c +++ b/src/s_rintl.c @@ -106,7 +106,7 @@ OLM_DLLEXPORT type \ fn(type x) \ { \ type ret; \ - fenv_t env; \ + fenv_t env = __fe_dfl_env; \ \ fegetenv(&env); \ ret = rint(x); \