summaryrefslogtreecommitdiff
path: root/src/timezone
diff options
context:
space:
mode:
authorTom Lane2012-11-20 02:21:28 +0000
committerTom Lane2012-11-20 02:21:28 +0000
commit278b60598c648b677dbde1330f9f95676aa82e46 (patch)
tree105d7596e3838e9e6af346b77c0e3c5a8b7ee702 /src/timezone
parent83d48a81f8e25f16a133f56874f1bcdee7838841 (diff)
Improve handling of INT_MIN / -1 and related cases.
Some platforms throw an exception for this division, rather than returning a necessarily-overflowed result. Since we were testing for overflow after the fact, an exception isn't nice. We can avoid the problem by treating division by -1 as negation. Add some regression tests so that we'll find out if any compilers try to optimize away the overflow check conditions. Back-patch of commit 1f7cb5c30983752ff8de833de30afcaee63536d0. Per discussion with Xi Wang, though this is different from the patch he submitted.
Diffstat (limited to 'src/timezone')
0 files changed, 0 insertions, 0 deletions