From: Jakub Jelinek <jakub@redhat.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]
Date: Tue, 28 Sep 2021 18:49:38 +0200 [thread overview]
Message-ID: <20210928164938.GA304296@tucnak> (raw)
In-Reply-To: <328154f6-b9d9-cd19-d595-ededf84fde34@idea>
On Tue, Sep 28, 2021 at 12:44:58PM -0400, Patrick Palka wrote:
> Ah yeah, sorry for the noise, I misunderstood the function comment.
>
> On a related note I think 'ctx' can also be a NAMESPACE_DECL here in
> the case of a defaulted non-member operator<=> (as in the below), for
> which I'd expect the added COMPLETE_TYPE_P check to crash, but it looks
> like in this case DECL_INITIAL is error_mark_node instead of NULL_TREE
> so a crash is averted. If anyone else was wondering...
>
> struct A {
> friend constexpr bool operator==(const A&, const A&);
> };
>
> constexpr bool operator==(const A&, const A&) = default;
That means maybe ctx isn't the right way to get at the type and we
should look it up from the first argument's type?
I guess I'll look at where the build_comparison_op takes it from...
Jakub
next prev parent reply other threads:[~2021-09-28 16:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 9:24 Jakub Jelinek
2021-09-28 13:49 ` Patrick Palka
2021-09-28 13:53 ` Patrick Palka
2021-09-28 19:33 ` Jason Merrill
2021-09-28 20:34 ` [PATCH, v2] " Jakub Jelinek
2021-09-29 8:07 ` Jakub Jelinek
2021-09-29 18:14 ` Jason Merrill
2021-09-29 19:21 ` Jakub Jelinek
2021-09-29 19:38 ` Jason Merrill
2021-09-30 17:24 ` [PATCH, v3] " Jakub Jelinek
2021-09-30 19:01 ` Jason Merrill
2021-10-01 15:07 ` [PATCH, v4] " Jakub Jelinek
2021-10-06 2:40 ` [PATCH, v5] " Jason Merrill
2021-10-06 9:06 ` Jakub Jelinek
2021-10-06 21:13 ` Jason Merrill
2021-09-28 13:56 ` [PATCH] " Jakub Jelinek
2021-09-28 16:44 ` Patrick Palka
2021-09-28 16:49 ` Jakub Jelinek [this message]
2021-09-28 16:55 ` Jakub Jelinek
2021-09-28 17:25 ` Patrick Palka
2021-09-28 18:04 ` Jakub Jelinek
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=20210928164938.GA304296@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ppalka@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).