From: simonmar Date: Tue, 28 Sep 2004 13:15:19 +0000 (+0000) Subject: [project @ 2004-09-28 13:15:19 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1571 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c6226d8a6cbdb568343724fe2e1880d9683d37d9;p=ghc-hetmet.git [project @ 2004-09-28 13:15:19 by simonmar] Avoid some warnings from gcc by appending an 'LL' suffix to 64-bit integers on a 32-bit platform. Suggested by: Sven Panne --- diff --git a/ghc/compiler/cmm/PprC.hs b/ghc/compiler/cmm/PprC.hs index 51e429b..630f6a5 100644 --- a/ghc/compiler/cmm/PprC.hs +++ b/ghc/compiler/cmm/PprC.hs @@ -357,6 +357,12 @@ pprMachOpApp mop args pprLit :: CmmLit -> SDoc pprLit lit = case lit of + CmmInt i I64 | machRepByteWidth I32 == wORD_SIZE + -> pprHexVal i <> ptext SLIT("LL") + -- Append an 'LL' suffix to 64-bit integers on a 32-bit + -- platform. This might not be strictly necessary (the + -- type will always be apparent from the context), but + -- it avoids some warnings from gcc. CmmInt i _rep -> pprHexVal i CmmFloat f rep -> parens (machRepCType rep) <> (rational f) CmmLabel clbl -> mkW_ <> pprCLabel clbl