public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jason Merrill <jason@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, v2] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]
Date: Wed, 29 Sep 2021 10:07:06 +0200	[thread overview]
Message-ID: <20210929080706.GJ304296@tucnak> (raw)
In-Reply-To: <20210928203439.GG304296@tucnak>

On Tue, Sep 28, 2021 at 10:34:39PM +0200, Jakub Jelinek via Gcc-patches wrote:
> On Tue, Sep 28, 2021 at 03:33:35PM -0400, Jason Merrill wrote:
> > > > According to the function comment for defaulted_late_check, won't
> > > > COMPLETE_TYPE_P (ctx) always be false here?
> > 
> > Not for a function defaulted outside the class.
> > 
> > > If so, I wonder if we could get away with moving this entire fragment
> > > from defaulted_late_check to finish_struct_1 instead of calling
> > > defaulted_late_check from finish_struct_1.
> > 
> > The comment in check_bases_and_members says that we call it there so that
> > it's before we clone [cd]tors.  Probably better to leave the call there for
> > other functions, just skip it for comparisons.
> 
> So like this instead then?  Just tested with dg.exp=*spaceship* so far.
> 
> 2021-09-28  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/102490
> 	* method.c (defaulted_late_check): Don't synthetize constexpr
> 	defaulted comparisons.
> 	(finish_struct_1): Synthetize constexpr defaulted comparisons here
> 	after layout_class_type.
> 
> 	* g++.dg/cpp2a/spaceship-eq11.C: New test.
> 	* g++.dg/cpp2a/spaceship-eq12.C: New test.

Also successfully bootstrapped/regtested on x86_64-linux and i686-linux.

	Jakub


  reply	other threads:[~2021-09-29  8:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  9:24 [PATCH] " 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 [this message]
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
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=20210929080706.GJ304296@tucnak \
    --to=jakub@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).