logo       

RE: ghc 6.2 possible bug with gcc 3.3.x, strange parse error: msg#00034

lang.haskell.glasgow.bugs

Subject: RE: ghc 6.2 possible bug with gcc 3.3.x, strange parse error


> > Incedentally, GCC 3.4 will make this situation even worse.
> They have
> > now taken the approach that a backslash followed by
> whitespace at the
> > end of the line should be interpreted as a line continuation (and a
> > warning is emitted). So the hack from the Users' Guide for
> string gaps
> > will no longer work with GCC 3.4.
> >
> > I can't see a workaround, so it might be that string gaps
> will not be
> > useable with CPP from now on.
>
> Might the cpp -traditional flag mitigate this? Will it also use the
> newer lexing rule?

This is with -traditional. Without -traditional you get even more
problems (// is treated as a comment start, for example).

> I noticed today that new versions of gcc's cpp (already?) lex
> the input
> into tokens based on the C syntax, and do not guarantee to preserve
> horizontal whitespace. We already know that Haskell identifiers
> with a single prime fall foul of the C lexing rules unless you use
> -traditional, but are we also in danger of losing indentation layout
> through cpp?

I wouldn't be surprised. Using CPP has always been a bit dodgy; I think
Alastair is right and we should find a simple standalone CPP to bundle
with compilers.

Cheers,
Simon


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise