From: Jason Merrill <jason@redhat.com>
To: Roger Sayle <roger@nextmovesoftware.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [C++ PATCH] PR c++/96437: ICE-on-invalid-code error recovery.
Date: Wed, 9 Mar 2022 23:18:01 -0500 [thread overview]
Message-ID: <36a85719-6795-436e-6fba-3d7265f5f9ac@redhat.com> (raw)
In-Reply-To: <00a701d833e4$719cc850$54d658f0$@nextmovesoftware.com>
On 3/9/22 14:35, Roger Sayle wrote:
>
> Hi Jason,
>
> Very many thanks for your reviews/approvals of these ICE-on-invalid-code fixes.
>
>>> + if (TREE_VALUE (new_parm) != error_mark_node)
>>> + DECL_VIRTUAL_P (TREE_VALUE (new_parm)) = true;
>>
>> Hmm, I wonder about returning early if there was an error, but this is fine as is.
>
> The challenge here is the need to perform "current_binding_level = entry_scope;"
> required to restore the parser state before returning. Now that the parser is
> written in C++, we could (in theory) make more use of destructors to automatically
> restore/pop state, making it safe(r) to just "return error_mark_node" immediately
> in more places.
Yes, e.g.
auto ov = make_temp_override (current_binding_level);
>>> +/* { dg-options "-O2" } */
>>
>> This also seems unneeded for this test.
>
> Doh! Force of habit (from working in the middle-end). Consider this removed
> from all the test cases below.
>
> Is there any chance I could ask you to also look at these (that probably slipped
> through the net), though PR 84964 might require a nod from a middle-end maintainer.
>
> PR c++/39751: https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590951.html
> PR c++/84964: https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590961.html
> PR c++/95999: https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590653.html
> PR c++/96442: https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590716.html
Will do.
Jason
prev parent reply other threads:[~2022-03-10 4:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 12:33 Roger Sayle
2022-03-07 23:43 ` Jason Merrill
2022-03-09 18:35 ` Roger Sayle
2022-03-10 4:18 ` 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=36a85719-6795-436e-6fba-3d7265f5f9ac@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=roger@nextmovesoftware.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).