New submission from STINNER Victor: On Windows 64-bit, Visual Studio generates a lot of warnings because Py_ssize_t values are downcasted to int.
Attached patch fixes all warnings and move the final downcast into compiler_addop_i(). This function uses an assertion to check that integer parameter fits into an C int type. I don't know if it's safe to "return 0" on overflow error. The patch fixes also some indentation issues seen was I wrote the patch. Nobody complained before, I don't know if the bugs can be seen in practice, so I prefer to not touch Python 2.7 nor 3.2. ---------- files: compile_ssize_t.patch keywords: patch messages: 202976 nosy: benjamin.peterson, haypo, serhiy.storchaka priority: normal severity: normal status: open title: Fix usage of Py_ssize_t type in Python/compile.c versions: Python 3.4 Added file: http://bugs.python.org/file32644/compile_ssize_t.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19617> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com