This is the mail archive of the
mailing list for the GCC project.
Re: [pph] Make libcpp symbol validation a warning (issue5235061)
On 11-10-13 17:55 , Gabriel Charette wrote:
I'm not sure exactly how you skip headers already parsed now (we
didn't used to when I wrote this code and that was the only problem
remaining in the line_table (i.e. duplicate entries for guarded
headers in the non-pph compile)), but couldn't you count the number of
skipped entries and assert (line_table->used - used_before) +
numSkipped == expected_in) ?
The problem is that the compilation process of foo.h -> foo.pph may
generate different line tables than a compile that includes foo.pph.
When we compile foo.h, the line table incorporates the effects of
including 2.pph, and that's what we save to foo.pph. However, when
compiling foo.cc, the first thing we do is include 2.pph, so when
processing the include for foo.pph, we will completely skip over 2.pph.
That's why we cannot really have the same line table that we had when we