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)
committerBen Gamari <ben@smart-cactus.org>
Sat, 29 Apr 2017 02:35:04 +0000 (22:35 -0400)
commite5b3492f23c2296d0d8221e1787ee585331f726e
treee1d6797dadc265db7f97615ff71c65c3d83db9c0
parent6d14c1485cb570cbd183bcdc0f858d9a6dc1eb31
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