This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpplib: _cpp_read_and_prescan patch


On Sun, Mar 19, 2000 at 09:50:32PM +0900, Neil Booth wrote:
> This patch does the following:-
> 
> o Redoes the method used to detect end-of-input-buffer.  Previously, a
> null character was used.  Now a '\\' is used.  Moreover, when
> examining the 3 special cases '?', '\\' and '\r' in the switch
> statement, enough characters are guaranteed to be in the input buffer
> that checking for end-of-buffer is not necessary.  This simplifies the
> logic there, and fixes a bug (see next).
> 
> o The previous logic for backslash-newline did not work correctly in
> some end-of-buffer conditions.  This is fixed.
> 
> o Fixes a couple of "test previous character" conditions where we
> could not be sure of their existence / contents at the very start of
> the scan (op[-1] and ip[-2] resp.)
> 
> o Since nulls are no longer special, as a benefit that they are
> treated like any other "normal" character.  Slight modification of
> token handling will resolve the null character problem for the
> preprocessing stage.
> 
> o The code is negligibly different in speed speed to the previous
> routine.

OK.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]