When compiled with -O2, we get extra warnings
This is happending on a WinXP installation:
-----------------------------------------------
[arf]~/tst>cat Main.hs
module Main where
import CString
foreign import ccall "readline" gnuRL :: CString -> IO
CString
main = main
[arf]~/tst>ghc --version
The Glorious Glasgow Haskell Compilation System,
version 6.0.1
[arf]~/tst>ghc -c -ffi Main.hs
[arf]~/tst>rm Main.o Main.hi
[arf]~/tst>ghc -O2 -c -ffi Main.hs
c:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc: In
function `s1cV_entry':
c:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc:52:
warning: implicit declaration of function `readline'
c:/DOCUME~1/lerkok/LOCALS~1/Temp/ghc2484.hc:52:
warning: assignment makes pointer from integer without
a cast
--------------------------------------------------
For some reason, compiling with -O2 produces these
warnings that don't show up otherwise.
Trac metadata
Trac field |
Value |
Version |
6.0.1 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedWon'tFix |
Component |
Compiler (FFI) |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|