1>..\Modules\_pickle.c(710): warning C4293: '>>' : shift count negative or too big, undefined behavior 1>..\Modules\_pickle.c(711): warning C4293: '>>' : shift count negative or too big, undefined behavior 1>..\Modules\_pickle.c(712): warning C4293: '>>' : shift count negative or too big, undefined behavior 1>..\Modules\_pickle.c(713): warning C4293: '>>' : shift count negative or too big, undefined behavior 1>..\Modules\_pickle.c(1158): warning C4018: '<' : signed/unsigned mismatch The first 4 should be easy to fix by using a SIZEOF_SIZE_T >= 8 #ifdef test. The last is on: if (frame_len < n) { ... raise an exception ... where `frame_len` is size_t and `n` is Py_ssize_t.
This appears to be back with slightly different line numbers: ..\Modules\_pickle.c(718): warning C4293: '>>' : shift count negative or too big, undefined behavior ..\Modules\_pickle.c(719): warning C4293: '>>' : shift count negative or too big, undefined behavior ..\Modules\_pickle.c(720): warning C4293: '>>' : shift count negative or too big, undefined behavior ..\Modules\_pickle.c(721): warning C4293: '>>' : shift count negative or too big, undefined behavior ..\Modules\_pickle.c(1647): warning C4146: unary minus operator applied to unsigned type, result still unsigned Seems to have been caused by 14f2776686b3.
The attached patch fixes the warnings and doesn't appear to break anything obvious. The first 4 are fixed by reverting Alexandre's change from '#if SIZEOF_SIZE_T' to 'if (sizeof(size_t)'. The last one is different from the original 5th warning, and is fixed using the same trick that has been used in Modules/audioop.c; that is, use '(-0x7fffffffL - 1)' rather than '-0x80000000L', which MSVC can't seem to handle.