cpplib: double speed of comment skipping
Neil Booth
NeilB@earthling.net
Sat Apr 8 00:46:00 GMT 2000
Zack Weinberg wrote:-
> > + else if (c == '/')
> > + {
> > + /* Avoid false positives for the comment's initial '*'. */
> > + if (cur[-2] == '*' && cur - 2 >= CPP_BUFFER (pfile)->cur)
> > + goto out;
>
> I believe you can avoid the extra check by changing the FORWARD(1) at
> the beginning, to FORWARD(2). I'll test the patch with that change
> made.
Hmmm. What if the character after the "/*" is a '\n' or '\r'?
Neil.
More information about the Gcc-patches
mailing list