logo       

[ ghc-Bugs-830247 ] When compiled with -O2, we get extra warnings: msg#00061

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-830247 ] When compiled with -O2, we get extra warnings

Bugs item #830247, was opened at 2003-10-25 14:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=830247&group_id=8032

Category: Compiler (FFI)
Group: 6.0.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: When compiled with -O2, we get extra warnings

Initial Comment:
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.


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=830247&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise