X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FConst.lhs;h=2c2fbb4ee45fb0427e5fb39e831d2feab1ac0e9c;hb=9073ad8f30d2555d0e70601538c7138aba6d7e58;hp=7348a0dcd03cb8daa8376e596f2013d14e1cd9c4;hpb=049530c73051d5c39aeb90bc7ca4d5d474854d0a;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/Const.lhs b/ghc/compiler/basicTypes/Const.lhs index 7348a0d..2c2fbb4 100644 --- a/ghc/compiler/basicTypes/Const.lhs +++ b/ghc/compiler/basicTypes/Const.lhs @@ -346,8 +346,12 @@ pprLit lit <+> ppr range_max)]) -- in interface files, parenthesize raw negative ints. -- this avoids problems like {-1} being interpreted - -- as a comment starter. + -- as a comment starter. -} | ifaceStyle sty && i < 0 -> parens (integer i) + -- avoid a problem whereby gcc interprets the constant + -- minInt as unsigned. + | code_style && i == (toInteger (minBound :: Int)) + -> parens (hcat [integer (i+1), text "-1"]) | otherwise -> integer i where