Message270079
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. |
|
| Date |
User |
Action |
Args |
| 2016-07-10 09:49:48 | ztane | set | recipients:
+ ztane, martin.panter, serhiy.storchaka, xiang.zhang |
| 2016-07-10 09:49:48 | ztane | set | messageid: <[email protected]> |
| 2016-07-10 09:49:48 | ztane | link | issue27473 messages |
| 2016-07-10 09:49:48 | ztane | create | |
|