Overview
| Artifact ID: | ffb154fd37adfcb6774ac142a4457920631923b3 |
|---|---|
| Ticket: | 1241572fffffffffffffffffffffffffffffffff
[expr] blind spot at corner of 32/64 bit integers |
| User & Date: | rmax on 2005-12-10 00:32:22 |
Changes
- icomment:
Logged In: YES user_id=124643 This fix depends on implementation defined behaviour of the compiler and fails with gcc 4.1.0. What happens is, that the compiler decides that the negation of a negative number can never have a negative result, and so it optimizes away the special case for INT_MIN as dead code. There are two solutions for this: either rewriting the code so that it doesn't depend on the assumption that -MIN_INT == MIN_INT, or use the -fwrapv parameter to gcc, so that it guarantees the wrapping behaviour of integers. See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25329
- login: "rmax"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "rmax"