[project @ 1998-11-16 11:56:09 by sof]
[ghc-hetmet.git] / ghc / compiler / reader / ReadPrefix.lhs
index 8024e08..44e8e62 100644 (file)
@@ -962,7 +962,12 @@ wlkExtName (U_just pt)
       [mod,nm] -> returnUgn (ExtName nm (Just mod))
 
 rdCallConv :: Int -> UgnM CallConv
-rdCallConv x = returnUgn x
+rdCallConv x = 
+   -- this tracks the #defines in parser/utils.h
+  case x of
+    (-1) -> -- no calling convention specified, use default.
+          returnUgn defaultCallConv
+    _    -> returnUgn x
 
 rdForKind :: Int -> Bool -> UgnM ForKind
 rdForKind 0 isUnsafe = -- foreign import