[GHC] #8372: enable -dcmm-lint by default for .cmm input files

#8372: enable -dcmm-lint by default for .cmm input files ------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- I'm finding it's quite easy to write `.cmm` files with subtle errors that cause ghc to emit code that wasn't what I wanted! For example, I wrote a comparison between two arguments of different integer sizes and the code generator picked the wrong size. After tracking down the bug, I tried `-dcmm-lint` and it caught my error right away. It makes sense not to have `-dcmm-lint` enabled by default for Cmm produced from Stg, but I've seen here on the GHC wiki that `-dcmm-lint` is advised for hand-written `.cmm` files. But `integer-gmp`, and probably many other packages, don't build `.cmm` files with `-dcmm-lint`. Is there a reason we can't/shouldn't just make it the default? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8372 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8372: enable -dcmm-lint by default for .cmm input files -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.7 Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by thomie): For reference, in `rts/ghc.mk` we do have: {{{ # We *want* type-checking of hand-written cmm. rts_HC_OPTS += -dcmm-lint }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8372#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC