Message341374
sum() assumes that an arithmetic operation on signed longs will wrap modulo 2**(bits_in_long) on overflow. However, signed overflow causes undefined behaviour according to the C standards (e.g., C99 6.5, para. 5), and gcc is known to assume that signed overflow never occurs in correct code, and to make use of this assumption when optimizing.
See also issue7406. |
|
Date |
User |
Action |
Args |
2019-05-04 05:54:49 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, mark.dickinson |
2019-05-04 05:54:49 | serhiy.storchaka | set | messageid: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> |
2019-05-04 05:54:49 | serhiy.storchaka | link | issue36791 messages |
2019-05-04 05:54:48 | serhiy.storchaka | create | |
|