projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Major bugfixing pass through the type checker
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcForeign.lhs
diff --git
a/compiler/typecheck/TcForeign.lhs
b/compiler/typecheck/TcForeign.lhs
index
782ce3f
..
73fd449
100644
(file)
--- a/
compiler/typecheck/TcForeign.lhs
+++ b/
compiler/typecheck/TcForeign.lhs
@@
-132,7
+132,7
@@
tcCheckFIType sig_ty arg_tys res_ty idecl@(CImport cconv safety _ (CFunction tar
return idecl
| cconv == PrimCallConv = do
dflags <- getDOpts
return idecl
| cconv == PrimCallConv = do
dflags <- getDOpts
- check (dopt Opt_GHCForeignImportPrim dflags)
+ check (xopt Opt_GHCForeignImportPrim dflags)
(text "Use -XGHCForeignImportPrim to allow `foreign import prim'.")
checkCg (checkCOrAsmOrLlvmOrDotNetOrInterp)
checkCTarget target
(text "Use -XGHCForeignImportPrim to allow `foreign import prim'.")
checkCg (checkCOrAsmOrLlvmOrDotNetOrInterp)
checkCTarget target
@@
-310,7
+310,8
@@
checkCConv CCallConv = return ()
#if i386_TARGET_ARCH
checkCConv StdCallConv = return ()
#else
#if i386_TARGET_ARCH
checkCConv StdCallConv = return ()
#else
-checkCConv StdCallConv = addErrTc (text "calling convention not supported on this platform: stdcall")
+-- 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 PrimCallConv = addErrTc (text "The `prim' calling convention can only be used with `foreign import'")
checkCConv CmmCallConv = panic "checkCConv CmmCallConv"
#endif
checkCConv PrimCallConv = addErrTc (text "The `prim' calling convention can only be used with `foreign import'")
checkCConv CmmCallConv = panic "checkCConv CmmCallConv"