Mark Dickinson <dicki...@gmail.com> added the comment: > This is puzzling, isn't it?
I don't see why. There's nothing in -Wall -Wextra -Wsigned-overflow that asks for warnings for code that might overflow. Indeed, I don't see how any compiler could reasonably provide such warnings without flagging (almost) every occurrence of arithmetic on signed integers as suspect.[*] The -ftrapv option is useful for catching genuine signed-integer overflows at runtime, but it can still only catch those cases that actually get exercised (e.g., by the Python test suite). [*] Even some operations on unsigned integers would have to be flagged: the C expression "(unsigned short)x * (unsigned short)y" also has the potential to invoke undefined behaviour, thanks to C's integer promotion rules. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1621> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com