MERGE: In hashExpr, use Word32 rather than relying on wrapping behaviour of Int
authorIan Lynagh <igloo@earth.li>
Sun, 3 Dec 2006 22:33:37 +0000 (22:33 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 3 Dec 2006 22:33:37 +0000 (22:33 +0000)
commitdf95de0ba37cd137429e28821283372f63544784
treed0c385c3167aaa9a2148129d8b2469f938b26c65
parent961276aad92a5318719e3e996e7d0fc9b7daa2e3
MERGE: In hashExpr, use Word32 rather than relying on wrapping behaviour of Int
Fixes #952, as it turns out.

When compiling via C, we are at the mercy of C's undefined behaviour
with respect to overflow of signed integer operations, and this was
biting us here.

Perhaps we should always add the -fwrapv flag to gcc, but since
Haskell doesn't define overflow on Int either, it seemed the right
thing to do to fix this code anyway.
compiler/coreSyn/CoreUtils.lhs