在 2025-3-12 20:42, Jacek Caban 写道:
From: Billy Laws <blaw...@gmail.com>

---
  mingw-w64-crt/misc/winbs_uint64.c | 2 +-
  mingw-w64-crt/misc/winbs_ulong.c  | 5 +++--
  mingw-w64-crt/misc/winbs_ushort.c | 5 +++--
  3 files changed, 7 insertions(+), 5 deletions(-)

Can we use `__builtin_bswap{16,32,64}` in these files now?

GCC 4.3 added `__builtin_bswap32(int32_t x)` and `__builtin_bswap64(int64_t x)`. GCC 4.8 added `__builtin_bswap16(uint16_t x)` and changed the others to unsigned parameters.

For `_byteswap_ushort()`, if compatibility with GCC 4.7- is desired, we can always use `__builtin_bswap32(_Short) >> 16`.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

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

Reply via email to