在 2026-7-3 17:31, Evgeny Karpov 写道:
On Sat, 13 Jun 2026, LIU Hao wrote:
Hello,

Attached are patches which change the base types of `u?int_fast16_t` to
`unsigned? int`, to match how these are declared in Microsoft UCRT headers.

These changes are small but are technically an ABI break. A consequent
change may be needed in Clang. Your perspective will be appreciated.

As it is ABI breaking change, it requires handling.
mingw/mingw-stdint.h is used by ix86 and aarch64.
aarch64-w64-mingw32 is not stabilized yet, and it will require recompilation
after some contributions anyway.
However, it should be handled for ix86.

Here is an idea how it can be done.

mingw/mingw-stdint.h might be changed as it was proposed.

mingw-w64-headers/crt/stdint.h

  #define __need_wchar_t
  #include <stddef.h>
+#if !defined (MINGW_ABI_VERSION)
+#if __GNUC__ <= 16
+#define MINGW_ABI_VERSION 1
+#else
+#define MINGW_ABI_VERSION 2
+#endif
+#endif
+
... ... Starting from GCC 17, a new MinGW ABI will be used. And if some code should be compatible
with previous ABI version, MINGW_ABI_VERSION 1 should be defined.

(I just realized that this didn't include a hunk for `U?INT_FAST16_M(IN|AX)`.)

I'm pretty sure this macro is likely to go unnoticed, so it's not very 
different from not having a macro.

What I'm particularly asking is whether this should be changed, or be kept 
permanently as a divergence.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to