From c6226d8a6cbdb568343724fe2e1880d9683d37d9 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 28 Sep 2004 13:15:19 +0000 Subject: [PATCH] [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 --- ghc/compiler/cmm/PprC.hs | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 1.7.10.4