On Tue, 27 Oct 2026, LIU Hao wrote:

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

Oh, look at that :-) Yeah that has been in the tree for 18 months, and if nobody complained, it's probably fine. And while we might not want to require the very latest GCC, it is nice if we can update the minimum requirement at least by a little, gradually...

// Martin

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

Reply via email to