[GHC] #3389: CPP strips out C-style comments

GHC trac at galois.com
Sun Jul 26 15:10:42 EDT 2009


#3389: CPP strips out C-style comments
---------------------------------+------------------------------------------
    Reporter:  nominolo          |        Owner:                  
        Type:  feature request   |       Status:  reopened        
    Priority:  normal            |    Milestone:                  
   Component:  Driver            |      Version:  6.10.2          
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by nominolo):

  * status:  closed => reopened
  * type:  bug => feature request
  * resolution:  invalid =>

Comment:

 At least my version of {{{cpp}}} (GNU cpp on Mac OS X 10.5) claims to have
 this option:
 {{{
        -C  Do not discard comments.  All comments are passed through to
 the
            output file, except for comments in processed directives, which
 are
            deleted along with the directive.

            You should be prepared for side effects when using -C; it
 causes the
            preprocessor to treat comments as tokens in their own right.
 For
            example, comments appearing at the start of what would be a
 directive
            line have the effect of turning that line into an ordinary
 source
            line, since the first token on the line is no longer a #.
 }}}

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


More information about the Glasgow-haskell-bugs mailing list