Martin v. Löwis <mar...@v.loewis.de> added the comment: > size = Py_SIZE(a) * n; > > The multiplication should be safe from overflow, and I don't get > any warning at all either with this rewrite (using -O3 -Wall -Wextra - > Wsigned-overflow=5) or from the original code, so there's nothing to > silence.
This is puzzling, isn't it? It *could* overflow, could it not? >> I think there is a second solution: perform the multiplication >> unsigned in the first place. > > That would work too. I find the above code clearer, though. I agree in this case. In general, I'm not convinced that it is always possible to rewrite the code in that way conveniently. ---------- _______________________________________ 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