Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/7a80e2ddc60c611c744c38659a293d3f429efd20

>---------------------------------------------------------------

commit 7a80e2ddc60c611c744c38659a293d3f429efd20
Author: Ian Lynagh <[email protected]>
Date:   Fri Jun 17 18:47:08 2011 +0100

    Fix the build with GHC 6.12

>---------------------------------------------------------------

 compiler/cmm/CmmRewriteAssignments.hs |    9 +++++++--
 compiler/cmm/CmmSpillReload.hs        |    9 +++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/compiler/cmm/CmmRewriteAssignments.hs 
b/compiler/cmm/CmmRewriteAssignments.hs
index 56045d5..46e877c 100644
--- a/compiler/cmm/CmmRewriteAssignments.hs
+++ b/compiler/cmm/CmmRewriteAssignments.hs
@@ -3,9 +3,14 @@
 {-# LANGUAGE FlexibleContexts #-}
 
 {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
-#if __GLASGOW_HASKELL__ < 701
--- GHC 7.0.1 improved incomplete pattern warnings with GADTs
+
+-- GHC 7.0.1 improved incomplete pattern warnings with GADTs, but for
+-- older compilers we need to turn warn-incomplete-patterns off.
+-- However, older compilers don't support OPTIONS_GHC inside CPP, so
+-- we instead always turn it off, and then conditionally turn it back on.
 {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
+#if __GLASGOW_HASKELL__ >= 700
+{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
 #endif
 
 -- This module implements generalized code motion for assignments to
diff --git a/compiler/cmm/CmmSpillReload.hs b/compiler/cmm/CmmSpillReload.hs
index e3f631d..031d200 100644
--- a/compiler/cmm/CmmSpillReload.hs
+++ b/compiler/cmm/CmmSpillReload.hs
@@ -3,9 +3,14 @@
 -- If this module lives on I'd like to get rid of this flag in due course
 
 {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
-#if __GLASGOW_HASKELL__ < 701
--- GHC 7.0.1 improved incomplete pattern warnings with GADTs
+
+-- GHC 7.0.1 improved incomplete pattern warnings with GADTs, but for
+-- older compilers we need to turn warn-incomplete-patterns off.
+-- However, older compilers don't support OPTIONS_GHC inside CPP, so
+-- we instead always turn it off, and then conditionally turn it back on.
 {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
+#if __GLASGOW_HASKELL__ >= 700
+{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
 #endif
 
 module CmmSpillReload



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to