Wed Jul  9 03:21:43 PDT 2008  Simon Marlow <[EMAIL PROTECTED]>
  * add -fwarn-dodgy-foreign-imports (see #1357)
  
  From the entry in the User's guide:
  
  -fwarn-dodgy-foreign-imports causes a warning to be emitted for
  foreign imports of the following form:
  
  foreign import "f" f :: FunPtr t
  
  on the grounds that it probably should be
  
  foreign import "&f" f :: FunPtr t
  
  The first form declares that `f` is a (pure) C function that takes no
  arguments and returns a pointer to a C function with type `t`, whereas
  the second form declares that `f` itself is a C function with type
  `t`.  The first declaration is usually a mistake, and one that is hard
  to debug because it results in a crash, hence this warning.

    M ./compiler/main/DynFlags.hs -1 +4
    M ./compiler/typecheck/TcForeign.lhs +9
    M ./compiler/typecheck/TcType.lhs +4
    M ./docs/users_guide/using.xml -2 +28

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20080709102143-12142-89b3353f3542c4accb0a1e8ec1f43603d446db8c.gz

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

Reply via email to