Enable new warning for fragile/incorrect CPP #if usage
authorErik de Castro Lopo <erik.decastrolopo@ambiata.com>
Tue, 4 Apr 2017 19:53:46 +0000 (05:53 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 4 Apr 2017 19:53:47 +0000 (05:53 +1000)
commit7e340c2bbf4a56959bd1e95cdd1cfdb2b7e537c2
tree0f330ad348b5100f1a21312e7c91e43966789ec8
parent5e968f9261b798222a845ef38a54621b45013678
Enable new warning for fragile/incorrect CPP #if usage

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.

Test Plan: Validate on Linux and Windows

Reviewers: austin, angerman, simonmar, bgamari, Phyx

Reviewed By: bgamari

Subscribers: thomie, snowleopard

Differential Revision: https://phabricator.haskell.org/D3278
27 files changed:
compiler/utils/Util.hs
ghc/GHCi/UI.hs
includes/CodeGen.Platform.hs
includes/Stg.h
includes/rts/OSThreads.h
includes/stg/HaskellMachRegs.h
includes/stg/MachRegs.h
includes/stg/RtsMachRegs.h
includes/stg/SMP.h
libraries/ghci/GHCi/ObjLink.hs
mk/warnings.mk
rts/LinkerInternals.h
rts/OldARMAtomic.c
rts/PrimOps.cmm
rts/RtsUtils.c
rts/Schedule.c
rts/Threads.c
rts/ghc.mk
rts/linker/MachO.c
rts/posix/GetTime.c
rts/posix/OSMem.c
rts/posix/OSThreads.c
rts/posix/itimer/Pthread.c
rts/sm/CNF.c
rts/sm/GCUtils.c
rts/sm/GCUtils.h
rts/sm/MBlock.c