[GHC] #10360: GHC ignores command-line options if *.o and *.hi files exist

GHC ghc-devs at haskell.org
Tue Apr 28 04:40:39 UTC 2015


#10360: GHC ignores command-line options if *.o and *.hi files exist
-------------------------------------+-------------------------------------
        Reporter:  asr               |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by asr:

Old description:

> For example, given the module
>
> {{{#!hs
> module Test where
>
> foo = putStrLn "Hello World"
> }}}
>
> if I compile using the command
>
> {{{
> ghc -c Test.hs
> }}}
>
> and then I compile adding the `-Wall` flag
>
> {{{
> ghc -c -Wall Test.hs
> }}}
>
> I would expect the warning
>
> {{{
> Test.hs:3:1: Warning:
>     Top-level binding with no type signature: foo :: IO ()
> }}}
>
> but GHC produces the message
>
> {{{
> compilation IS NOT required
> }}}
>
> That is, the `-Wall` flag was ignored because the `Test.o` and `Test.hi`
> exist.
>
> (I couldn't reproduce this behaviour using gcc version 4.6.3.)

New description:

 For example, given the module

 {{{#!hs
 module Test where

 foo = putStrLn "Hello World"
 }}}

 if I compile using the command

 {{{
 ghc -c Test.hs
 }}}

 and then I compile adding the `-Wall` flag

 {{{
 ghc -c -Wall Test.hs
 }}}

 I would expect the warning

 {{{
 Test.hs:3:1: Warning:
     Top-level binding with no type signature: foo :: IO ()
 }}}

 but GHC produces the message

 {{{
 compilation IS NOT required
 }}}

 That is, the `-Wall` flag was ignored because the `Test.o` and `Test.hi`
 exist.

 (I couldn't reproduce this behaviour using GCC version 4.6.3.)

--

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10360#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list