diff options
author | Erik de Castro Lopo <erik.decastrolopo@ambiata.com> | 2017-04-05 05:53:46 +1000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-28 22:35:04 -0400 |
commit | e5b3492f23c2296d0d8221e1787ee585331f726e (patch) | |
tree | e1d6797dadc265db7f97615ff71c65c3d83db9c0 /rts/sm | |
parent | 6d14c1485cb570cbd183bcdc0f858d9a6dc1eb31 (diff) | |
download | haskell-e5b3492f23c2296d0d8221e1787ee585331f726e.tar.gz |
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
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/CNF.c | 2 | ||||
-rw-r--r-- | rts/sm/GCUtils.c | 2 | ||||
-rw-r--r-- | rts/sm/GCUtils.h | 2 | ||||
-rw-r--r-- | rts/sm/MBlock.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/rts/sm/CNF.c b/rts/sm/CNF.c index b81fd2b55b..4864e601f8 100644 --- a/rts/sm/CNF.c +++ b/rts/sm/CNF.c @@ -1171,7 +1171,7 @@ compactFixupPointers(StgCompactNFData *str, dbl_link_onto(bd, &g0->compact_objects); RELEASE_SM_LOCK; -#if DEBUG +#ifdef DEBUG if (root) verify_consistency_loop(str); #endif diff --git a/rts/sm/GCUtils.c b/rts/sm/GCUtils.c index 9fda2fe070..3717faebed 100644 --- a/rts/sm/GCUtils.c +++ b/rts/sm/GCUtils.c @@ -346,7 +346,7 @@ alloc_todo_block (gen_workspace *ws, uint32_t size) * Debugging * -------------------------------------------------------------------------- */ -#if DEBUG +#ifdef DEBUG void printMutableList(bdescr *bd) { diff --git a/rts/sm/GCUtils.h b/rts/sm/GCUtils.h index 072b1fc60d..657fb783d1 100644 --- a/rts/sm/GCUtils.h +++ b/rts/sm/GCUtils.h @@ -51,7 +51,7 @@ isPartiallyFull(bdescr *bd) } -#if DEBUG +#ifdef DEBUG void printMutableList (bdescr *bd); #endif diff --git a/rts/sm/MBlock.c b/rts/sm/MBlock.c index f6640d173c..833dd8c7c2 100644 --- a/rts/sm/MBlock.c +++ b/rts/sm/MBlock.c @@ -657,7 +657,7 @@ initMBlocks(void) #ifdef USE_LARGE_ADDRESS_SPACE { W_ size; -#if aarch64_HOST_ARCH +#ifdef aarch64_HOST_ARCH size = (W_)1 << 38; // 1/4 TByte #else size = (W_)1 << 40; // 1 TByte |