The C code in the RTS now gets built with -Wundef and the Haskell code
(stages 1 and 2 only) with -Wcpp-undef. We now get warnings whereever
#if is used on undefined identifiers.
- rGHC Glasgow Haskell Compiler
No Unit Test Coverage
- Build Status
Buildable 14907 Build 24219: [GHC] Linux/amd64: Patch building Build 24218: [GHC] OSX/amd64: Continuous Integration Build 24217: [GHC] Windows/amd64: Continuous Integration (compile only) Build 24216: arc lint + arc unit
@angerman If that was the only inconsistency in the GHC code base it would be well worth the effort to make it consistent. Furthermore, I think having coding requirements that are not backed up by either the compiler or linting tools is a waste of time. Happy to defer to others if their opinions differ from mine.
Looking at these again, I suspect a lot of these aren't right. If you look at includes/stg/HaskellMachRegs.h it seems like these MACHREGS_ macros are always defined. just to either 0 or 1.
By switching these from #if to #if defined(..) they're now all trivially always true.