[GHC] #944: OPTIONS_GHC in included file ignored sometimes

GHC trac at galois.com
Sun Oct 15 11:16:49 EDT 2006


#944: OPTIONS_GHC in included file ignored sometimes
-----------------------+----------------------------------------------------
  Reporter:  greenrd   |          Owner:                
      Type:  bug       |         Status:  new           
  Priority:  normal    |      Milestone:                
 Component:  Compiler  |        Version:  6.6           
  Severity:  normal    |       Keywords:                
Difficulty:  Unknown   |   Architecture:  x86_64 (amd64)
        Os:  Linux     |  
-----------------------+----------------------------------------------------
In the attached test case, the OPTIONS_GHC pragma is ignored in the
 included header file. However, the problem goes away if you use --make,
 surprisingly. Unfortunately, in my real code, the problem does not go away
 when I use --make.

 I'd argue that this (putting OPTIONS_GHC in a #include file) should work,
 because

 (a) It worked with ghc 6.4.2

 (b) It's useful to centralise options in one place

 (c) Logically, if the first line of the #included file is the OPTIONS_GHC
 pragma, and the #include line is on the first line of the .hs file, the
 OPTIONS_GHC should appear to ghc to be in the right place.

 Compile this test case with: ghc -cpp test.hs

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/944>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list