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]
Other format: [Raw text]

Re: cpplib: reusing cached include files


Per Bothner <per@bothner.com> writes:

> Zack Weinberg wrote:
>
>> What we want to do is cache the results of _cpp_clean_line, not the
>> raw buffers.
>
> Yes.  The problem is the _cpp_clean_line cleans the raw buffer
> in-place, possibly shortening each line.  If we try then re-read
> the buffer, there is left-over duplicate crud between the end of
> the cleaned line, and the original raw line.  My patch overwrites
> this crud with whitespace to avoid confusion.

Okay, yes, that should work.  You will also need to preserve the
"line notes" structure.

zw


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