This is the mail archive of the
mailing list for the GCC project.
Re: cpplib: reusing cached include files
Per Bothner <email@example.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.