public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Nathaniel Shead <nathanieloshead@gmail.com>
Cc: Patrick Palka <ppalka@redhat.com>,
	gcc-patches@gcc.gnu.org, Nathan Sidwell <nathan@acm.org>
Subject: Re: [PATCH][14 backport] c++: Fix instantiation of imported temploid friends [PR114275]
Date: Thu, 23 May 2024 18:41:06 -0400	[thread overview]
Message-ID: <afdc5f25-aaa3-4178-ad6a-1fae689d1656@redhat.com> (raw)
In-Reply-To: <66420006.170a0220.4a5f3.40ce@mx.google.com>

On 5/13/24 07:56, Nathaniel Shead wrote:
>>> @@ -11751,9 +11767,16 @@ tsubst_friend_class (tree friend_tmpl, tree args)
>>>          if (tmpl != error_mark_node)
>>>    	{
>>>    	  /* The new TMPL is not an instantiation of anything, so we
>>> -	     forget its origins.  We don't reset CLASSTYPE_TI_TEMPLATE
>>> +	     forget its origins.  It is also not a specialization of
>>> +	     anything.  We don't reset CLASSTYPE_TI_TEMPLATE
>>>    	     for the new type because that is supposed to be the
>>>    	     corresponding template decl, i.e., TMPL.  */
>>> +	  spec_entry elt;
>>> +	  elt.tmpl = friend_tmpl;
>>> +	  elt.args = CLASSTYPE_TI_ARGS (TREE_TYPE (tmpl));
>>> +	  elt.spec = TREE_TYPE (tmpl);
>>> +	  type_specializations->remove_elt (&elt);
>>
>> For GCC 14.2 let's guard this with if (modules_p ()); for GCC 15 it can be
>> unconditional.  OK.
> 
> I'm looking to backport this patch to GCC 14 now that it's been on trunk
> some time.  Here's the patch I'm aiming to add (squashed with the
> changes from r15-220-gec2365e07537e8) after cherrypicking the
> prerequisite commit r15-58-g2faf040335f9b4; is this OK?
> 
> Or should I keep it as two separate commits to make the cherrypicking
> more obvious? Not entirely sure on the etiquette around this.

It's OK to squash them, but it's typical to use -x (directly or via git 
gcc-backport) to mention where a branch change was cherry-picked from, 
and in this case it would make sense to edit in the second commit so 
it's clear the backport includes both.  OK that way.

Jason


  parent reply	other threads:[~2024-05-23 22:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25  9:17 [PATCH] c++/modules: " Nathaniel Shead
2024-04-15  4:49 ` [PATCH v2 1/2] c++: Standardise errors for module_may_redeclare Nathaniel Shead
2024-04-17 15:13   ` Patrick Palka
2024-04-19 16:18   ` Nathaniel Shead
2024-04-25 19:52     ` Jason Merrill
2024-04-15  4:53 ` [PATCH v2 2/2] c++/modules: Fix instantiation of imported temploid friends [PR114275] Nathaniel Shead
2024-04-17 18:02   ` Patrick Palka
2024-04-19  2:14     ` Nathaniel Shead
2024-04-19 16:29       ` [PATCH v3 2/2] c++: " Nathaniel Shead
2024-04-27  1:16         ` Jason Merrill
2024-04-29  9:34           ` [PATCH v4 " Nathaniel Shead
2024-04-29 22:37             ` Jason Merrill
2024-05-13 11:56               ` [PATCH][14 backport] " Nathaniel Shead
2024-05-23 22:29                 ` Patrick Palka
2024-05-23 22:41                 ` Jason Merrill [this message]
2024-05-24  8:06                   ` Nathaniel Shead
2024-05-24 13:54                     ` Jason Merrill
2024-05-24 14:21                       ` Nathaniel Shead
2024-05-24 14:40                       ` Iain Sandoe
2024-05-24 15:13                         ` 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=afdc5f25-aaa3-4178-ad6a-1fae689d1656@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nathan@acm.org \
    --cc=nathanieloshead@gmail.com \
    --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).