Message 272499 - Python tracker (original) (raw)

I don't think adding -Wno-type-limits is a good idea.

The good question is how that can be happening, e.g. how PY_SSIZE_T_MAX divided by sizeof anything can be more than max(size_t)? E.g now that I stare at the code, that warning should be impossible if everything is correct. It means either that the RHS is negative or size_t is defined to be 32-bit in this compilation unit whereas PY_SSIZE_T is 64-bit. Neither sound like a good idea.