
#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 George): To a naive users who doesn't know how the -O* options are implemented it is very surprising. A language that is not order dependent should not have command line options that are! Haskell differs from other languages thus I don't know why Haskell command line option processing needs to agree with them. In any case we definitely need to document the current behavior of 7.10.<n> I like Gidyn's suggestion above to process meta-flags before specific flags, regardless of their order on the command line. However as Ben writes above, perhaps it is best not to concentrate on order but on "the fact that -O and -f can silently conflict and one has know way of knowing this" Perhaps the simplest example of the issue is that the following do different things and there is currently no documentation that explains what that is. I think a warning or error would be appropriate. ghc -fspecialise -fno-specialise <filename>.hs ghc -fno-specialise -fspecialise <filename>.hs -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10560#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler