C Preprocessor

John Meacham john at repetae.net
Wed Dec 19 20:03:42 EST 2007


On Thu, Dec 06, 2007 at 04:59:48PM +0200, Antti-Juhani Kaijanaho wrote:
> On Thu, Dec 06, 2007 at 10:43:30AM +0100, Bernd Brassel wrote:
> > Is it already a known problem that the preprocessor cannot cope with the
> > whole set of possible string declarations?
> 
> The cpp is a *C* preprocessor, and if it has been written to adhere to
> the C standard, it is required to diagnose tokens that are not valid C
> preprocessing tokens (such as string literals that do not end before the
> end of a line).  As such, this is unsurprising.
> 
> It would probably make most sense to make cpphs the (only) preprocessor
> used with -cpp instead of using whatever *C* preprocessor happens to be
> in the path.  

I have added an option to jhc to allow 'm4' as a preprocessor. (-fm4), I
have found it to play much nicer with haskell than cpp and is
signifigantly more powerful. perhaps other compilers could do
likewise?

I invoke it with
changequote({{,}})
at the beginning which seems to work well for haskell.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Glasgow-haskell-users mailing list