Browse source

Changelog

Query
From:
To:
Branch:
Path:
Message:
BugID:
User: +
Format:
: 1 checkin (+18/-12) by Marcus Comstedt <marcus@mc.pp.se> Lines added/removed recently

Wednesday 15 September 2021

2021-09-15 17:15:23 (1 year ago) by Marcus Comstedt <marcus@mc.pp.se>

Compiler [Typechecker]: Workaround for gcc optimization of signed overflow

The expression "(min1 > max2) && (min1 > max2 + 1)" got optimized into
"(min1 > max2 + 1)" by gcc, because of min1 is larger than max2 + 1,
then it clearly must be larger than max2 as well... Except when max2 + 1
is a signed overflow. So explicitly check for that instead and hope gcc
doesn't optimize away that check as well...

[permalink]

Bugs? Suggestions?