logo       

RE: \s at the end of lines and cpp: msg#00015

lang.haskell.glasgow.bugs

Subject: RE: \s at the end of lines and cpp

Thanks Ian for finding this Bug.

I have encountered it before with wxHaskell and I had
just removed the line :-) Now, that I know what causes
this, I'll add an extra space or comment or something.

-- Daan.

> -----Original Message-----
> From: helium-request@xxxxxxxx
> [mailto:helium-request@xxxxxxxx] On Behalf Of Ian Lynagh
> Sent: woensdag 3 september 2003 22:05
> To: helium@xxxxxxxx; glasgow-haskell-bugs@xxxxxxxxxxx
> Cc: helium@xxxxxxxx
> Subject: \s at the end of lines and cpp
>
>
>
> Hi guys,
>
> Presumably as one of the gcc 3.3 changes, cpp now treats all
> '\'s at the end of a line as a line continuation character
> (at least I imagine that's what is happening, but it doesn't
> seem to be actually eating a '\n').
>
> This means that when Helium says
>
> infixl 9 \\
>
> in ../../lvm/src/lib/common/Set.hs, which is compiled with
> -cpp, ghc says
>
> ../../lvm/src/lib/common/Set.hs:137: parse error on input `\'
>
> as it is seeing
>
> infixl 9 \
>
> Adding a ';' to the end of the line is one way to fix this.
>
> I'm not sure if the GHC guys consider this a bug; it could
> possibly be worked around by protecting trailing '\'s (just
> appending a space is
> sufficient) on lines cpp shouldn't be looking at, but for
> macro calling lines that might not be possible.
>
>
> Thanks
> Ian
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~
> Please send contributions for the mailing list to: helium@xxxxxxxx
> Please contact the mailing-list-owner as:
> helium-request@xxxxxxxx
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~
>
>
>


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

News | FAQ | advertise