On 21 February 2017 at 15:03, Erich E. Hoover erich.e.hoover@wine-staging.com wrote:
I'm not convinced that this statement is true. For example, while "~(SIZE_T)0 - 7" gives us 4294967288 (matching what is indicated by the warning), HeapReAlloc accepts a SIZE_T. So, this should support a maximum value of 4294967295 (not 2147483647). This says to me that gcc thinks SIZE_T is a signed value instead of an unsigned value, do you have any idea why this might be the case?
It doesn't check against the type's size, but against the size specified by -Walloc-size-larger-than=. If that's not explicitly set, that's PTRDIFF_MAX.