[commit: ghc] master: Enable new warning for fragile/incorrect CPP #if usage (e5b3492)

git at git.haskell.org git at git.haskell.org
Sat Apr 29 02:35:22 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e5b3492f23c2296d0d8221e1787ee585331f726e/ghc

>---------------------------------------------------------------

commit e5b3492f23c2296d0d8221e1787ee585331f726e
Author: Erik de Castro Lopo <erik.decastrolopo at ambiata.com>
Date:   Wed Apr 5 05:53:46 2017 +1000

    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


>---------------------------------------------------------------

e5b3492f23c2296d0d8221e1787ee585331f726e
 compiler/utils/Util.hs         |  2 +-
 ghc/GHCi/UI.hs                 |  2 +-
 includes/CodeGen.Platform.hs   | 52 +++++++++++++++++++++++-------------------
 includes/Stg.h                 |  6 ++---
 includes/rts/OSThreads.h       |  4 ++--
 includes/stg/HaskellMachRegs.h | 36 ++++++++++++++++++++++-------
 includes/stg/MachRegs.h        | 14 ++++++------
 includes/stg/RtsMachRegs.h     | 36 ++++++++++++++++++++++-------
 includes/stg/SMP.h             | 37 ++++++++++++++++--------------
 libraries/ghci/GHCi/ObjLink.hs |  2 +-
 mk/warnings.mk                 |  4 ++--
 rts/LinkerInternals.h          |  3 ++-
 rts/OldARMAtomic.c             |  2 +-
 rts/PrimOps.cmm                |  4 ++--
 rts/RtsUtils.c                 |  4 ++--
 rts/Schedule.c                 | 16 ++++++-------
 rts/Threads.c                  |  2 +-
 rts/ghc.mk                     |  3 +++
 rts/linker/MachO.c             | 10 ++++----
 rts/posix/GetTime.c            |  2 +-
 rts/posix/OSMem.c              |  8 +++----
 rts/posix/OSThreads.c          |  2 +-
 rts/posix/itimer/Pthread.c     |  6 ++---
 rts/sm/CNF.c                   |  2 +-
 rts/sm/GCUtils.c               |  2 +-
 rts/sm/GCUtils.h               |  2 +-
 rts/sm/MBlock.c                |  2 +-
 27 files changed, 159 insertions(+), 106 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc e5b3492f23c2296d0d8221e1787ee585331f726e


More information about the ghc-commits mailing list