[project @ 1997-11-24 20:18:06 by sof]
authorsof <unknown>
Mon, 24 Nov 1997 20:18:07 +0000 (20:18 +0000)
committersof <unknown>
Mon, 24 Nov 1997 20:18:07 +0000 (20:18 +0000)
Fix to have _casm_gc_ cope with statement blocks; misc import mods to have modules compile with 2.09 (and later.)

ghc/compiler/absCSyn/CStrings.lhs
ghc/compiler/absCSyn/PprAbsC.lhs

index c6beabf..b47da2b 100644 (file)
@@ -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}
 
index bfa229b..fe822b4 100644 (file)
@@ -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)