diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2022-11-01 23:38:48 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2022-11-02 00:25:22 +0100 |
commit | b9c3014e6552253435af9a24122c87cf03bb35b2 (patch) | |
tree | ba7b429a961168a7a4e2c20d8284b4f2696c9cc6 /libpack.so.do | |
parent | c941c00f7ea53acaa54c30d34c9efbf986072888 (diff) | |
download | pack-b9c3014e6552253435af9a24122c87cf03bb35b2.tar.gz pack-b9c3014e6552253435af9a24122c87cf03bb35b2.tar.xz pack-b9c3014e6552253435af9a24122c87cf03bb35b2.zip |
As N1570ยง6.5.16.2p3 states, E1 += E2 is equivalent to E1 = E1 + (E2).
This means that E1 + (E2) will be subject to (6.5.6p4) "the usual
arithmetic conversions". Since both types have equal integer conversion
rank (6.3.1.1p1), E1 which was intmax_t will first be converted to
uintmax_t before being added to (E2). This is not the intended result as
it relies on integer wrapping behaviour again. Casting E2 to intmax_t
first prevents the conversion of E1 and produces the correct result.
Diffstat (limited to 'libpack.so.do')
0 files changed, 0 insertions, 0 deletions