[GHC] #10560: -f and -O options interact in non-obvious, order dependent ways
GHC
ghc-devs at haskell.org
Mon Jun 22 19:46:18 UTC 2015
#10560: -f and -O options interact in non-obvious, order dependent ways
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by rwbarton):
The parts of this I feel strongly about are
* GHC should never warn about a command line that is valid. It will just
cause too many headaches for build systems. The effects of options should
be clearly documented and then GHC should do what the user asks without
any second-guessing. If a combination of options really doesn't make
sense, then it should be an error and not a warning.
* `-ffoo -fno-foo` and `-fno-foo -ffoo` (and `-O1 -O0`, etc.) should be
valid with the last flag taking priority, as is the case today.
I'm not really qualified to comment on how obvious the current behavior of
`-fno-specialise -O1` is (it's obvious to me, but I've had the dubious
pleasure of reading through DynFlags.hs on many occasions). I also can't
think of a use case where the rule suggested in comment:2 "process all
`-O` flags before all `-f` flags" would prevent one from doing something
useful. So it sounds OK to me. But no warnings please!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10560#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list