On Sat, 22 Feb 2025, Jacek Caban wrote:

This improves MSVC compatibility and unifies the code across different targets.
---
mingw-w64-headers/crt/fenv.h | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/mingw-w64-headers/crt/fenv.h b/mingw-w64-headers/crt/fenv.h
index 1645d07d3..a9fea981d 100644
--- a/mingw-w64-headers/crt/fenv.h
+++ b/mingw-w64-headers/crt/fenv.h
@@ -62,9 +62,6 @@

#if defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || 
defined(__aarch64__)

-/* Type representing exception flags. */
-typedef unsigned int fexcept_t;
-
/* Type representing floating-point environment.  */
typedef struct
{
@@ -76,13 +73,6 @@ typedef struct

#else

-/*
-  For now, support only for the basic abstraction of flags that are
-  either set or clear. fexcept_t could be  structure that holds more
-  info about the fp environment.
-*/
-typedef unsigned short fexcept_t;
-
/* This 32-byte struct represents the entire floating point
   environment as stored by fnstenv or fstenv, augmented by
   the  contents of the MXCSR register, as stored by stmxcsr
@@ -120,6 +110,9 @@ typedef struct

#endif /* defined(_ARM_) || defined(__arm__) */

+/* Type representing exception flags. */
+typedef unsigned long fexcept_t;
+

In principle, this is an ABI break, but I presume use of this type is very rare, and even more rare to place it in a public ABI surface, so I guess it is ok - and aligning these things more with how MSVC does things is generally good to do.

// Martin



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to