
#14946: GHC Calls CPP for HS with -undef -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): I think erikd was referring to something a bit unrelated to this issue. Warning flags are not the issue. As far as I can see going as far back as ghc 7.8 (I stopped trying to track it after that as the option keeps getting refactored to somewhere else making the blame annoying) it seems that GHC has always passed `-undef` to the C preprocessor. Which I think is a mistake. It makes the CPP mode a lot less useful. For instance https://phabricator.haskell.org/D26 was one such refactoring that moved the option from somewhere else. So we've been doing this for years and years. I should probably finish the archeology to see if I can't figure out why we did this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14946#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler