Antti Haapala added the comment:
The previous code was perfectly fine with `-fwrapv` since it makes signed
overflow behaviour defined. And afaik BDFLs stance is that signed integer
overflow should be defined to wrap anyhow.
----
In my opinion the `-fwrapv` itself makes one proliferate all these insane
wrap-checks; indeed I'd rather have them defined in a macro, something like
if (PYSSIZE_OVERFLOWS_ON_ADD(va.len, vb.len)) {
PyErr_NoMemory();
goto done;
}
size = va.len + vb.len;
even though `-fwrapv` is defined; that way it'd be obvious what is supposed to
happen there.
----------
nosy: +ztane
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue27473>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com