[GHC] #2596: Token concatentation (##) in C preprocessor
GHC
trac at galois.com
Mon Sep 15 15:30:42 EDT 2008
#2596: Token concatentation (##) in C preprocessor
--------------------------------+-------------------------------------------
Reporter: sedillard | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.3
Severity: normal | Resolution:
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
--------------------------------+-------------------------------------------
Comment (by malcolm.wallace at cs.york.ac.uk):
This occurs because ghc calls the C preprocessor with the -traditional
flag, and the ## string-catenation operator is not K&R, it was introduced
in the ANSI version of C. There are various good reasons why it is
necessary for ghc to use cpp -traditional rather than -ansi. You can try
passing the -ansi flag manually ({{{ghc -optP-ansi}}}) but results are not
guaranteed to be useful. Another route to try is to install cpphs and
instruct ghc to use it instead of cpp. {{{ghc -pgmPcpphs -optP--cpp
-optP-ansi}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2596#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list