#12752: GHC should be able to warn on unsafe CPP usage -------------------------------------+------------------------------------- Reporter: erikd | Owner: erikd Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): phab:D2626 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"3cb32d8b0b51c548ab424139c66cce6b37a2ab1b/ghc" 3cb32d8/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="3cb32d8b0b51c548ab424139c66cce6b37a2ab1b" Add -Wcpp-undef warning flag When enabled, this new warning flag passes `-Wundef` to the C pre-processor which causes the pre-processor to warn on uses of the `#if` directive on undefined identifiers. It is not currently enabled in any of the standard warning groups. Test Plan: Make sure the two tests pass on all major platforms. Reviewers: hvr, carter, Phyx, bgamari, austin Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2626 GHC Trac Issues: #12752 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12752#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler