Skip to content

enable -dcmm-lint by default for .cmm input files

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?

Trac metadata
Trac field Value
Version 7.7
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information