public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
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: Mon, 17 Oct 2011 13:39:00 -0000	[thread overview]
Message-ID: <CAD_=9DS5k3KMRLktYe6ZLc_vPUJ_72LLBJCX4f_F9Wrb1B=Cng@mail.gmail.com> (raw)
In-Reply-To: <CAAb05gEV2Z_uxJJUCW3qpF4rTYNmZcGCszcKOEcDieYZz45pfQ@mail.gmail.com>

On Fri, Oct 14, 2011 at 20:27, Gabriel Charette <gcharette1@gmail.com> wrote:
> Yes, I understand that.
>
> But when the second 2.pph is skipped when reading foo.pph, the reading
> of its line_table is also skipped (as foo.pph doesn't contain the
> line_table information for 2.h, 2.pph does and adds it when its
> included as a child, but if it's skipped, the line_table info for 2.h
> should never make it in the line_table), so I don't see why this is an
> issue for the line_table (other than the assert about the number of
> line table entries read). What I was suggesting is that as far as the
> assert is concerned it would be stronger to count the number of
> skipped child headers on read and assert num_read+num_skipped ==
> num_expected_childs basically (it is still only an assert so no big
> deal I guess).

Ah, I see what you are saying.  I didn't really bother too much with
that assert.  Since I was not reading the line table again, I figured
both asserts were triggering because of the different values coming
from the skipped file, so I left them out.

>
> Essentially this patch fixes the last bug we had in the line_table
> merging (i.e. that guarded out headers in the non-pph version weren't
> guarded out in the pph version) and this is a good thing. I'm just
> being picky about weakening asserts!
>
>
> I still think it would be nice to have a way to test constructs like
> the line_table at the end of parsing (maybe a new flag, as I was
> suggesting in my previous email, as gcc doesn't allow for modular
> testing) and compare pph and non-pph versions. Testing at this level
> would potentially be much better than trying to understand tricky test
> failures from the ground up. This is beyond the scope of this patch of
> course, but something to keep in mind I think.

Yeah.  I'll come back to it at a later point.


Diego.

  reply	other threads:[~2011-10-17 13:04 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
2011-10-15  8:00     ` Gabriel Charette
2011-10-17 13:39       ` Diego Novillo [this message]
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='CAD_=9DS5k3KMRLktYe6ZLc_vPUJ_72LLBJCX4f_F9Wrb1B=Cng@mail.gmail.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).