From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id CC08E3858C48 for ; Fri, 24 May 2024 15:13:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC08E3858C48 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CC08E3858C48 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716563603; cv=none; b=ABeBHZEiTb1u8lu34Pa0hSJRPL2Mbg9Tfy+DH1qfosBfLC5QtOGLmBgpTzuEMkpsmW6+8K1giJ4ofcUr34sc3k1/yllaF4n9MIi5Ew6rFV5VeepwOAQ7vlWXHmdi6Jetm7ktlmVExQD4340jtgivy9WEcPshalVOWSnN8F/Ujgk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716563603; c=relaxed/simple; bh=6DNjxT1EiLENhMTukjfmhK9kSfwYIvoDMaPz4Drjy+Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=xT9csRVIBR0qMYN7eET1aB8jzNxjphhSfliXtsPkAZBVmEc7QuRCseDvmfZMR9LijzRAhQ2oa98ZtYTfA4UJY0C7MMExt4COPiujYsCb3B5eDzoNFceCCdNWipWnuKesYA08Fl8okULUA1m1U1UUXRPyAw094wuHIcCuZY8lUG4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716563601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zD9pwLUBkMRPEHHaHyLNehhL/ccSYPgIvMM2ozpLdLw=; b=BQaUZ4mYyYUBOV1hSCDvGDTEDlUU6v0eIp21MmRWRESNwnQMifX6/+A5U9n9JRhPfYI4CM l6hrQQ0j+i/w246mcCPwyNkXXPTlz53wrL7AHCOswjYQuF3+mZtAk5nlaghiL7PHU8jMyV Q/1M+dIAk5CeytbsGRS2V4RdEb43oGw= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-tPY11H_dOQSoRLvW_tRx9w-1; Fri, 24 May 2024 11:13:17 -0400 X-MC-Unique: tPY11H_dOQSoRLvW_tRx9w-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-43fb098389aso16353481cf.1 for ; Fri, 24 May 2024 08:13:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716563597; x=1717168397; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zD9pwLUBkMRPEHHaHyLNehhL/ccSYPgIvMM2ozpLdLw=; b=VDBCybvzvngj/dmhUx3x/kYRiXa11fxSEbGIbB9kK3V1sM91lnllZkiXCS/YfNFHkm +s0Tj7MB3e8KrN9dXPfVgcHHD3yMZJo+b13wNqLtSDqMHBQKmqsLTo95ly0JxyF26Ffn LI7eSQ2v/ViyGGQ5KijleX74pKJiwhDnfn23QqOcADrg+Z3AGZ64UkxOKuoPLSN8dqPZ mF0WDBUK99c/9v6486cj5Ub1U/f5+mipJ3zZGZCSzV5DmwJfuPgaDp8NpGeoNmszGfk3 fUkUlLLTYmwiF5Q0v70LAq8nZ6L+Ojl5+ZBmk1AQwNCwIa0ttgas7R0u2ADiBIjJ4UGg /PKQ== X-Forwarded-Encrypted: i=1; AJvYcCUy8rVFtDb7e3mSGFl6Odb9hYeR8zIMQCJZHr31gFSRAzeyySfNQ7Euf2ucxn81gDw4zrzmZZv9Bbjh8Kr1w9HFyrAFLS4cpQ== X-Gm-Message-State: AOJu0YxCRbdnPG+VXVkvfmf0sypYlP5eCNhvg0g4XrXLhysFdqHTgkbH ubDsZohkGLWCTuZTeNqnrXyGpSF/U8Yc2cwsjQpHJWbCzwUgPS+BodQ0gCS3wLXABRDOpq7VrDx 2ggi7Cv04n/BhIevIkrkeSM9R4LmTK6U8F8GN7W82rT6koOYpzvsWCYU= X-Received: by 2002:a05:622a:1105:b0:43a:3502:8446 with SMTP id d75a77b69052e-43fa74dc3d4mr103674661cf.28.1716563597155; Fri, 24 May 2024 08:13:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGzMJw1ySlRbGShu2WFz88c4ZRPw9ebr1Cu5dZo7cQdR1L34YMZBbrwS2wQLrd7HjLF1jfPnA== X-Received: by 2002:a05:622a:1105:b0:43a:3502:8446 with SMTP id d75a77b69052e-43fa74dc3d4mr103674141cf.28.1716563596510; Fri, 24 May 2024 08:13:16 -0700 (PDT) Received: from [192.168.1.130] (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43fb17f0469sm8609451cf.35.2024.05.24.08.13.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 May 2024 08:13:15 -0700 (PDT) Message-ID: <3570dfac-6f35-4b89-919d-c4eb25459c74@redhat.com> Date: Fri, 24 May 2024 11:13:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH][14 backport] c++: Fix instantiation of imported temploid friends [PR114275] To: Iain Sandoe Cc: Nathaniel Shead , Patrick Palka , GCC Patches , Nathan Sidwell References: <66014130.170a0220.d7c40.0e9b@mx.google.com> <661cb2d3.170a0220.c9922.173d@mx.google.com> <6621d375.170a0220.8591f.8217@mx.google.com> <66229bfe.170a0220.d023c.cb93@mx.google.com> <662f69c6.170a0220.d3cac.81f9@mx.google.com> <66420006.170a0220.4a5f3.40ce@mx.google.com> <66504a9f.170a0220.406f9.228b@mx.google.com> <392f6ccb-2b2e-430b-b972-9c331aa51445@redhat.com> <8FA6E0CB-F7E1-45D0-B062-851A176CCBA8@googlemail.com> From: Jason Merrill In-Reply-To: <8FA6E0CB-F7E1-45D0-B062-851A176CCBA8@googlemail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 5/24/24 10:40, Iain Sandoe wrote: > > >> On 24 May 2024, at 14:54, Jason Merrill wrote: >> >> On 5/24/24 04:06, Nathaniel Shead wrote: >>> On Thu, May 23, 2024 at 06:41:06PM -0400, Jason Merrill wrote: >>>> 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. >>> Sorry, still a bit confused :) Do you mean to merge the two commits >>> together such that there are two "cherry picked from commit ..."s in the >>> commit message? Or just list second commit, and mention that it >>> includes both in the commit message? >> >> I was thinking >> >> (cherry picked from commit aaaaa and bbbbb) > > For the record, I do not think the git hooks with allow that exactly (or, at least, if they > do I did not find the right syntax); what I’ve done in similar cases is to keep the main > “cherry picked from” line for the main patch and then add text to the intro section > saying that xxxxxxxx and yyyyyyyy are also included. Looks like the git_commit.py regex "cherry picked from commit (?P\w+)" will ignore everything after the first commit-id, so it should be fine. You just can't pluralize "commit" to "commits". :) Jason