diff options
author | Ian Lynagh <igloo@earth.li> | 2011-10-14 20:36:30 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-10-14 20:36:30 +0100 |
commit | cc2a84025a674d53e83e348f20e0922234706d7c (patch) | |
tree | dcd010602407eda389122aba1cc9488e23d72cc7 | |
parent | 2dd5bf526f4145e6c1012a3117ad1534f45a53c2 (diff) | |
download | haskell-cc2a84025a674d53e83e348f20e0922234706d7c.tar.gz |
Remove some CPP
-rw-r--r-- | compiler/typecheck/TcForeign.lhs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs index 0f713f390a..c324eca596 100644 --- a/compiler/typecheck/TcForeign.lhs +++ b/compiler/typecheck/TcForeign.lhs @@ -43,10 +43,13 @@ import Coercion import PrelNames import DynFlags import Outputable +import Platform import SrcLoc import Bag import FastString import Util + +import Control.Monad \end{code} \begin{code} @@ -404,12 +407,11 @@ Calling conventions \begin{code} checkCConv :: CCallConv -> TcM () checkCConv CCallConv = return () -#if i386_TARGET_ARCH -checkCConv StdCallConv = return () -#else --- This is a warning, not an error. see #3336 -checkCConv StdCallConv = addWarnTc (text "the 'stdcall' calling convention is unsupported on this platform," $$ text "treating as ccall") -#endif +checkCConv StdCallConv = do dflags <- getDOpts + let platform = targetPlatform dflags + unless (platformArch platform == ArchX86) $ + -- This is a warning, not an error. see #3336 + addWarnTc (text "the 'stdcall' calling convention is unsupported on this platform," $$ text "treating as ccall") checkCConv PrimCallConv = addErrTc (text "The `prim' calling convention can only be used with `foreign import'") checkCConv CmmCallConv = panic "checkCConv CmmCallConv" \end{code} |