[GHC] #6132: Can't use both shebang line and #ifdef declarations in the same file.
GHC
ghc-devs at haskell.org
Sat Feb 20 22:23:12 UTC 2016
#6132: Can't use both shebang line and #ifdef declarations in the same file.
-------------------------------------+-------------------------------------
Reporter: gfxmonk | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.4
(Parser) |
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case: runghc/T6132
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* testcase: => runghc/T6132
* status: new => closed
* resolution: => fixed
Comment:
This was fixed in commit 7b0695a887c13a431f898d89938e127faa3f4585
(ghc-7.8.1):
{{{
Author: Austin Seipp <aseipp at pobox.com>
Date: Mon Jun 17 06:12:08 2013 -0500
Use assembler-with-cpp mode when running CPP.
This is needed because Clang is very strict about C99 macro rules,
which
dictate that '#' in a body must have a token immediately following it
for
string-ification. In practice we break this all the time, because we
do
very weird stuff like:
#define FOOBAR(xyz) \
{-# SOME PRAGMA #-} \
baz :: (xyz) \
baz = ...
where the leading '#' in in the macro body clearly breaks this rule.
Signed-off-by: Austin Seipp <aseipp at pobox.com>
}}}
Hurray Austin!
I added a test.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6132#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list