在 2026-10-27 18:55, Jonathan Wakely via Mingw-w64-public 写道:
Although one potential concern (which might not be a blocker) is for how
long __builtin_add_overflow has existed in GCC - some of our users like to
keep building with very old GCC/binutils. If that is a problem I guess it
should be possible to manually check things like "if (size >= __SIZE_MAX__
- (offsets))", but that's more error prone...

They were added in GCC 5.1.0:
https://gcc.gnu.org/gcc-5/changes.html#c-family

I have pushed this patch now.

e1ff62d7f9acfbcb748e636f097fd2e6cc21d249 (committed by Martin) added calls to `__builtin_mul_overflow()` so I suspect it's fine. However those callers of `__builtin_mul_overflow()` don't set `errno` on overflow, which should be fixed separately.


--
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