public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>, Nathan Sidwell <nathan@acm.org>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [C++ PATCH] Fix C++ parser endless diagnostics on CPP_PRAGMA_EOL (PR c++/88258)
Date: Sun, 02 Dec 2018 00:08:00 -0000	[thread overview]
Message-ID: <e9e7d82e-6f2c-242e-4896-07cc5edf8980@redhat.com> (raw)
In-Reply-To: <20181130205418.GH12380@tucnak>

On 11/30/18 3:54 PM, Jakub Jelinek wrote:
> Hi!
> 
> The following testcase endlessly diagnoses a syntax error.
> The problem is that the various C++ parser routines to skip tokens until
> something happily skip over CPP_PRAGMA that starts a pragma line, but
> always stop at CPP_PRAGMA_EOL, but the caller expect them to stop at
> something different.
> 
> The fix is similar to what the C FE already does, treat CPP_PRAGMA_EOL
> as CPP_EOF only if in_pragma flag is set.  Otherwise we didn't really parse
> CPP_PRAGMA normally and should skip everything until we find whatever we are
> looking for.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK.

Jason

      reply	other threads:[~2018-12-02  0:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 20:54 Jakub Jelinek
2018-12-02  0:08 ` Jason Merrill [this message]

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=e9e7d82e-6f2c-242e-4896-07cc5edf8980@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=nathan@acm.org \
    /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).