[PATCH v2] Remap __GLIBC_FLT_EVAL_METHOD to 0 if __FLT_EVAL_METHOD__ is -1

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Mar 16 18:42:52 GMT 2023


Hi Kito,

Thanks for the update, this looks good now.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>

Cheers,
Wilco


---
 bits/flt-eval-method.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/bits/flt-eval-method.h b/bits/flt-eval-method.h
index 75f57b9a0e..f9262d7d0b 100644
--- a/bits/flt-eval-method.h
+++ b/bits/flt-eval-method.h
@@ -26,14 +26,12 @@
    -1.  */
 
 /* In the default version of this header, follow __FLT_EVAL_METHOD__.
-   -1 is mapped to 2 (considering evaluation as long double to be a
-   conservatively safe assumption), and if __FLT_EVAL_METHOD__ is not
-   defined then assume there is no excess precision and use the value
-   0.  */
+   If __FLT_EVAL_METHOD__ is not defined or set to -1, assume there is no
+   excess precision and use the value 0 (this is correct for most targets). */
 
 #ifdef __FLT_EVAL_METHOD__
 # if __FLT_EVAL_METHOD__ == -1
-#  define __GLIBC_FLT_EVAL_METHOD      2
+#  define __GLIBC_FLT_EVAL_METHOD      0
 # else
 #  define __GLIBC_FLT_EVAL_METHOD       __FLT_EVAL_METHOD__
 # endif
-- 
2.39.2


More information about the Libc-alpha mailing list