[project @ 2000-05-08 15:03:24 by simonmar]
authorsimonmar <unknown>
Mon, 8 May 2000 15:03:24 +0000 (15:03 +0000)
committersimonmar <unknown>
Mon, 8 May 2000 15:03:24 +0000 (15:03 +0000)
Put the extern declarations *outside* the function body for a
CCodeBlock.  This will enable us to give "extern" declarations for
variables that have scope static to the current module.

ghc/compiler/absCSyn/PprAbsC.lhs

index 60aca39..8996adf 100644 (file)
@@ -361,13 +361,14 @@ pprAbsC (CCodeBlock lbl abs_C) _
     else
     case (pprTempAndExternDecls abs_C) of { (pp_temps, pp_exts) ->
     vcat [
-        char ' ',
+        empty,
+       pp_exts, 
        hcat [text (if (externallyVisibleCLabel lbl)
                          then "FN_("   -- abbreviations to save on output
                          else "IFN_("),
                   pprCLabel lbl, text ") {"],
 
-       pp_exts, pp_temps,
+       pp_temps,
 
        nest 8 (ptext SLIT("FB_")),
        nest 8 (pprAbsC abs_C (costs abs_C)),