From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) by sourceware.org (Postfix) with ESMTPS id 165023858D1E for ; Thu, 19 Oct 2023 22:51:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 165023858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=protonmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 165023858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=185.70.43.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697755879; cv=none; b=esx+HQFxIWcMUbuLQE5tQ492tfY71VeAvg8fPbacFJPuNubqFoNRfnRab15P9GHRJ9zpi8N3TYK3j3uDqX7nDAbzKkpX/s9uU88jf6rwaWDun+nAsDjEjaukb2TFhCI45KqST5Vx1WIs1WHRSH9oAH1u+8ucZE7zAA9G0PrfJf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697755879; c=relaxed/simple; bh=pqqbHZkcLoAqmY7IAuY3Z0BbXPR5/y4EoJnpuPUAy2A=; h=DKIM-Signature:Date:To:From:Subject:Message-ID:MIME-Version; b=BG7tZE1noDdKJJG6K8zUg+y4eIjoTMq88DLe8W8I09maBpMVBxgATzDPveyZQFUba2Hd7np8+zSkdqb505az9rhQrp5YBUPG2mWbqQz34npKaYdqat9dqqvRnomUFETpFkszDETNt/aeACav7z+o0LhBBqUcu3abzdYBmrmmb8k= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1697755877; x=1698015077; bh=pqqbHZkcLoAqmY7IAuY3Z0BbXPR5/y4EoJnpuPUAy2A=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=NIey7lO0Fq+FEXq9mSxzorbJxFb+FyjX9/I8Q3SIMaX3BohdW6n0Ld4l6tFjh/hGE 2cI60AOmo2QxQ1EJW3QdoLrEbq3m8Zo0+EkWLwfKk3f++0Mdtf000HSLOq+40sgErJ Oz6XAspMbhcrCQx64wyksrH3oYG3hhPPZLYMmbDuB/S0TjwGnhhszWbFZ5CTvJpFeI DnfQV8GRjIYoIsX8+NXKQ4noyJe6EX3XoTJoV34tHFmHEZx/dezSanXazdLggS0OKJ 7orkU82HVunDjcnkBqZYlGM8pFCBW/KR4GxxcNxs7Yi00FEWYE6ODN8crbGQMt3vLz 1c3CvvWPfyCOw== Date: Thu, 19 Oct 2023 22:51:07 +0000 To: Jason Merrill From: waffl3x Cc: Jakub Jelinek , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609] Message-ID: In-Reply-To: References: <0cc5b21d-4b27-4964-bec3-544c86307c74@redhat.com> Feedback-ID: 14591686:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,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: > A BASELINK expresses the result of name lookup for a member function, > since we need to pass information about the name lookup context along to > after overload resolution. >=20 > An OFFSET_REF (with PTRMEM_OK_P) is used to express that we saw the > &A::f syntax, so we could build a pointer to member if it resolves to an > implicit-object member function. >=20 > For an overload set containing only a single static member function, > build_offset_ref doesn't bother to build an OFFSET_REF, but returns the > BASELINK itself. >=20 > I think we need the OFFSET_REF for an explicit-object member function > because it expresses that the code satisfies the requirement "If the > operand names an explicit object member function, the operand shall be a > qualified-id." >=20 > It might simplify things to remove the optimization in build_offset_ref > so we get an OFFSET_REF even for a single static member function, and > add support for that to cp_build_addr_expr_1. >=20 > Jason Ah okay I think that sheds a little bit of light on things, and here I was trying not to involve overloads to make it easier for me to understand things, it seems it ended up making me miss some things. At a glance it seems like all I need to do then is disable the PTRMEM_OK_P flag then. I will try that and see how it goes, provided I can find where it's all setup. (I think I'm almost to the bottom of it, but it's tough to unravel so I'm not sure.) I'm also now realizing it's probably about time I add more tests involving overloads, because I avoided that early on and I don't think I ever got around to adding any for that. Alex