在 2026-2-28 03:16, Erez Geva via Mingw-w64-public 写道:
From: Erez Geva <[email protected]>

Signed-off-by: Erez Geva <[email protected]>
Signed-off-by: Erez Geva <[email protected]>
---
  mingw-w64-headers/crt/math.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h
index 03cedde34..db66bbca5 100644
--- a/mingw-w64-headers/crt/math.h
+++ b/mingw-w64-headers/crt/math.h
@@ -495,13 +495,13 @@ __fin)))
  #define fpclassify(x) \
  __mingw_choose_expr (                                         \
    __mingw_types_compatible_p (__typeof__ (x), double),            \
-    __fpclassify(x),                                            \
+    __fpclassify((double)x),                                      \

This shall be `(double)(x)`.

But, would you please show a piece of code about the necessity of these casts? The C standard (7.12.3 Classification macros, n3220) requires that the argument to one of the classification macros 'shall' be a floating-point type; otherwise it's a constraint violation and results in undefined behavior.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to