This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: backslash whitespace newline
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Neil Booth'" <neil at daikokuya dot co dot uk>
- Cc: "'Howard Hinnant'" <howard dot hinnant at gmail dot com>,<gcc at gcc dot gnu dot org>,<joseph at codesourcery dot com>
- Date: Tue, 25 Oct 2005 14:36:16 +0100
- Subject: RE: backslash whitespace newline
'Neil Booth' wrote:
> Dave Korn wrote:-
>
>>
>> I would like it to be retained in at least one case: CRLF line endings
>> should still work, specifically backslash-CR-LF should be usable to
>> indicate a continued line. So how about having gcc accept
>>
>> <cr>?<newline>
>>
>> instead?
>
> This is entirely orthogonal; the two issues should not be confused.
>
> Neil.
So it is. For a long time gcc accepted CRLF line ends everywhere *except*
after a continuation character; when it started working, I thought it was an
indirect consequence of the whitespace collapsing, but a quick browse
through cpplex.c/skip_escaped_newlines shows that it's only non-vertical
whitespace that gets collapsed, and that handle_newline specifically accepts
CR-LF (and LF-CR) as well as LF.
Apologies for the noise; I certainly agree it's a violation of the
language spec to allow tabs and spaces after the backslash.
cheers,
DaveK
--
Can't think of a witty .sigline today....