From: Patrick Palka <ppalka@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: Patrick Palka <ppalka@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769]
Date: Fri, 2 Feb 2024 15:36:00 -0500 (EST) [thread overview]
Message-ID: <5f06be77-2314-65e4-a242-b84059bebfbe@idea> (raw)
In-Reply-To: <f7fdce34-d255-4558-9794-4c3ae0626a5c@redhat.com>
On Fri, 2 Feb 2024, Jason Merrill wrote:
> On 2/2/24 14:41, Patrick Palka wrote:
> > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this
> > look OK for trunk?
> >
> > -- >8 --
> >
> > In r11-3261-gb28b621ac67bee we made tsubst_requires_expr never partially
> > substitute into a requires-expression so as to avoid checking its
> > requirements out of order during e.g. generic lambda regeneration.
> >
> > Unfortunately we still do need to partially substitute into a
> > requires-expression in rare cases, in particular when it's used in
> > associated constraints that we are directly substituting for sake of
> > declaration matching or dguide constraint rewriting. We can identify
> > this situation by checking processing_constraint_expression_p, so this
> > patch uses this predicate to control whether we defer substitution or
> > partially substitute. The entering_scope=true change in tsubst_baselink
> > is needed to avoid ICEing from tsubst_baselink during name lookup when
> > rewriting std::ranges::ref_view's dguide constraints.
>
> Actually, I don't think we want to enter the scope when rewriting constraints.
> Would tsubst_scope work instead?
Oops yes, because of the maybe_dependent_member_ref stuff, the handling
for which doesn't trigger here for some reason. Ah, I think it's
because the tf_dguide flag gets dropped during tsubst_requires_expr
since it uses tf_none rather than complain & ~tf_warning_or_error
which would preserve special tsubst flags such as tf_dguide. I'll fix...
>
> Jason
>
>
next prev parent reply other threads:[~2024-02-02 20:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 19:41 Patrick Palka
2024-02-02 19:41 ` [PATCH 2/2] c++: remove lookup_template_class's entering_scope flag Patrick Palka
2024-05-01 19:41 ` Patrick Palka
2024-05-01 20:22 ` Jason Merrill
2024-05-01 20:40 ` Patrick Palka
2024-05-01 20:52 ` Jason Merrill
2024-05-02 17:49 ` Patrick Palka
2024-05-02 18:11 ` Jason Merrill
2024-02-02 19:55 ` [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769] Jason Merrill
2024-02-02 20:01 ` Jason Merrill
2024-02-02 20:36 ` Patrick Palka [this message]
2024-02-02 20:57 ` Patrick Palka
2024-02-02 21:05 ` Jason Merrill
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=5f06be77-2314-65e4-a242-b84059bebfbe@idea \
--to=ppalka@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.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).