This is the mail archive of the
mailing list for the GCC project.
Re: Eager newline handling for cpplib [patch]
- To: Zack Weinberg <zack at rabi dot columbia dot edu>
- Subject: Re: Eager newline handling for cpplib [patch]
- From: Dave Brolley <brolley at cygnus dot com>
- Date: Mon, 15 Mar 1999 15:46:48 -0500
- CC: egcs-patches at cygnus dot com, bothner at cygnus dot com, eggert at twinsun dot com
- Organization: Cygnus Solutions Canada Ltd
- References: <199903131841.NAA17933@blastula.phys.columbia.edu>
Zack Weinberg wrote:
> 1999-03-13 12:56 -0500 Zack Weinberg <email@example.com>
> "Eager" newline handling for cpplib.
> * cppfile.c (read_and_prescan): Map backslash-newline to '\r'
> (which cannot otherwise appear in the processed buffer) and
> move it out of tokens that it appears in the middle of.
> Improve performance.
> (find_position): New function.
> * cpplib.c: \r (one character) indicates backslash
> newline, not \\\n (two characters). It cannot appear in the
> middle of a token.
What about a raw carriage return that appears in the middle of a string or
char constant, or a comment? I hope we're not treating a lone \r as an end
of line indicator....