From: Diego Novillo <dnovillo@google.com>
To: Gabriel Charette <gcharette1@gmail.com>
Cc: reply@codereview.appspotmail.com, crowl@google.com,
gcc-patches@gcc.gnu.org
Subject: Re: [pph] Make libcpp symbol validation a warning (issue5235061)
Date: Fri, 14 Oct 2011 13:43:00 -0000 [thread overview]
Message-ID: <4E982809.1010302@google.com> (raw)
In-Reply-To: <CAAb05gEkkvi+7Tc6ZDSAD8Lo=83oBttyCB0-q2ARUN5AX-Ej-A@mail.gmail.com>
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.
For instance,
foo.h:
#include "1.pph"
#include "2.pph"
#include "3.pph"
foo.cc:
#include "2.pph"
#include "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
generated foo.pph.
Diego.
next prev parent reply other threads:[~2011-10-14 12:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 21:30 Diego Novillo
2011-10-13 22:39 ` Gabriel Charette
2011-10-14 13:43 ` Diego Novillo [this message]
2011-10-15 8:00 ` Gabriel Charette
2011-10-17 13:39 ` Diego Novillo
2011-10-21 5:53 ` Gabriel Charette
2011-10-21 19:06 ` Lawrence Crowl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E982809.1010302@google.com \
--to=dnovillo@google.com \
--cc=crowl@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcharette1@gmail.com \
--cc=reply@codereview.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).