From: sof Date: Mon, 24 Nov 1997 20:18:07 +0000 (+0000) Subject: [project @ 1997-11-24 20:18:06 by sof] X-Git-Tag: Approx_2487_patches~1271 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a5596651376acbab028be83da2455a72552ed715;p=ghc-hetmet.git [project @ 1997-11-24 20:18:06 by sof] Fix to have _casm_gc_ cope with statement blocks; misc import mods to have modules compile with 2.09 (and later.) --- diff --git a/ghc/compiler/absCSyn/CStrings.lhs b/ghc/compiler/absCSyn/CStrings.lhs index c6beabf..b47da2b 100644 --- a/ghc/compiler/absCSyn/CStrings.lhs +++ b/ghc/compiler/absCSyn/CStrings.lhs @@ -18,6 +18,9 @@ IMPORT_1_3(Char (isAlphanum,ord,chr)) CHK_Ubiq() -- debugging consistency check import Pretty +#if __GLASGOW_HASKELL__ >= 209 +import Addr +#endif \end{code} diff --git a/ghc/compiler/absCSyn/PprAbsC.lhs b/ghc/compiler/absCSyn/PprAbsC.lhs index bfa229b..fe822b4 100644 --- a/ghc/compiler/absCSyn/PprAbsC.lhs +++ b/ghc/compiler/absCSyn/PprAbsC.lhs @@ -634,8 +634,8 @@ pprCCall sty op@(CCallOp op_str is_asm may_gc _ _) args results liveness_mask vo (pp_saves, pp_restores) = ppr_vol_regs sty vol_regs (pp_save_context, pp_restore_context) = if may_gc - then ( text "extern StgInt inCCallGC; SaveAllStgRegs(); inCCallGC++;", - text "inCCallGC--; RestoreAllStgRegs();") + then ( text "do { extern StgInt inCCallGC; SaveAllStgRegs(); inCCallGC++;", + text "inCCallGC--; RestoreAllStgRegs();} while(0);") else ( pp_basic_saves $$ pp_saves, pp_basic_restores $$ pp_restores)