From: Patrick Palka <ppalka@redhat.com>
To: Marek Polacek <polacek@redhat.com>
Cc: Jason Merrill <jason@redhat.com>,
Patrick Palka <ppalka@redhat.com>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c++: cv-quals of dummy obj for non-dep memfn call [PR105637]
Date: Fri, 3 Jun 2022 12:04:04 -0400 (EDT) [thread overview]
Message-ID: <f74d265b-68c7-ebbe-ced0-7a7b650a5fb3@idea> (raw)
In-Reply-To: <YponG3GlIzzb4mB3@redhat.com>
On Fri, 3 Jun 2022, Marek Polacek wrote:
> On Fri, Jun 03, 2022 at 11:16:26AM -0400, Jason Merrill via Gcc-patches wrote:
> > On 6/3/22 11:04, Patrick Palka wrote:
> > > > > @@ -4319,15 +4319,32 @@ maybe_dummy_object (tree type, tree* binfop)
> > > > > if (binfop)
> > > > > *binfop = binfo;
> > > > > - if (current_class_ref
> > > > > - /* current_class_ref might not correspond to current_class_type if
> > > > > - we're in tsubst_default_argument or a lambda-declarator; in either
> > > > > - case, we want to use current_class_ref if it matches CONTEXT. */
> > > > > - && (same_type_ignoring_top_level_qualifiers_p
> > > > > - (TREE_TYPE (current_class_ref), context)))
> > > > > + /* current_class_ref might not correspond to current_class_type if
> > > > > + we're in tsubst_default_argument or a lambda-declarator; in either
> > > > > + case, we want to use current_class_ref if it matches CONTEXT. */
> > > > > + tree ctype = current_class_ref ? TREE_TYPE (current_class_ref) :
> > > > > NULL_TREE;
> > > > > + if (ctype
> > > > > + && same_type_ignoring_top_level_qualifiers_p (ctype, context))
> > > > > decl = current_class_ref;
> > > > > else
> > > > > - decl = build_dummy_object (context);
> > > > > + {
> > > > > + /* Return a dummy object whose cv-quals are consistent with (the
> > > > > + non-lambda) 'this' if available. */
> > > > > + if (ctype)
> > > > > + {
> > > > > + int quals = 0;
>
> Sorry to nitpick, but this 0 could be TYPE_UNQUALIFIED.
Good point, fixed.
>
> Marek
>
>
prev parent reply other threads:[~2022-06-03 16:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 18:34 Patrick Palka
2022-05-26 18:57 ` Patrick Palka
2022-05-26 20:39 ` Jason Merrill
2022-05-26 21:54 ` Patrick Palka
2022-05-27 13:57 ` Patrick Palka
2022-06-02 15:57 ` Patrick Palka
2022-06-02 19:44 ` Jason Merrill
2022-06-02 19:57 ` Patrick Palka
2022-06-02 20:30 ` Jason Merrill
2022-06-03 14:46 ` Patrick Palka
2022-06-03 14:53 ` Jason Merrill
2022-06-03 15:04 ` Patrick Palka
2022-06-03 15:16 ` Jason Merrill
2022-06-03 15:22 ` Marek Polacek
2022-06-03 16:04 ` Patrick Palka [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=f74d265b-68c7-ebbe-ced0-7a7b650a5fb3@idea \
--to=ppalka@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=polacek@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).