From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) by sourceware.org (Postfix) with ESMTPS id C84993858D33 for ; Wed, 18 Oct 2023 17:28:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C84993858D33 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 C84993858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=185.70.43.22 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697650099; cv=none; b=GrnHvTQ5H+1V7pAE5Pulz6htgQNrwY52XOclZ5W2qA9GWlK4TU2utsbe1IMMPiFsR8ez+8K6aG2mLTKuW8bPYuqkgJgeA31fWo8A7AydnNBzlMG+m4Eh8NWZZIewe1FM39rBmhBjwaNRgVmsotnSqaISRLIuHB2rh850pgKxAv0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697650099; c=relaxed/simple; bh=z8mR6ohgIvGw9PHTv6oG1mDBTg7jzM0ZMdlI/aeHf6Q=; h=DKIM-Signature:Date:To:From:Subject:Message-ID:MIME-Version; b=i1MkDRq4KtxajjMisTKx8h65SlWXCXAqETKxkacIsqulDfaQNA4l8V1qR2tNZ+KhfoGCiJx6U0Nwl4D46Ustp96Ly6oaXupb9Q2szb7yIY3uzHpWT/yyWs5D3r/+zd+uj6R9RqXZu85ZeTc8YyEt2MrSLcugRit7GawxYB+LCyA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1697650096; x=1697909296; bh=z8mR6ohgIvGw9PHTv6oG1mDBTg7jzM0ZMdlI/aeHf6Q=; 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=VZDXWC/x3GjBKpERssfRWbHlBEOutilef6W+ZEmkGQj0wwgFHw/CKD/BPgN3R0/kj PcN5qShtmCelWeCD0mly8AqF6k3DhIl7PESzDWDiad7eiy7J4s3uJvsA6XA4vk1SET Vk9s4Bjmjfas5CnMqqPRc7QmMtD5LBa2mD0hFwKqufMZV5iEBP4rFMY96Ekbu9AkO0 JulxhfQHHxedmbUEoLflZVEhIpihoFoMucKYukH/F6qJ2LAdTFPJ+/BJK/tK35EwN5 G4N81yRtJv/T7o20Z/yvCTI8lzYL2koveM4zc5QoXBHuWdPkEnaPwrntaWGAilnd6z ruuFan/igUSNA== Date: Wed, 18 Oct 2023 17:28:10 +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: <9evl-z9cAecBNAGVh82igdeO_HCFYbASO5fS0ngotJBqdpab09FTYaMiAjlZUliISedO0mV66BldzWQtylI4Dax0yC2gdKWuM55xDaG6RQM=@protonmail.com> <09e57c81-5231-16e8-6e57-18c37663c325@redhat.com> <2024d9f2-7560-eb9e-e9d9-de8769a06a8b@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=-3.1 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: > > I will try to get something done today, but I was struggling with > > writing some of the tests, there's also a lot more of them now. I also > > wrote a bunch of musings in comments that I would like feedback on. > >=20 > > My most concrete question is, how exactly should I be testing a > > pedwarn, I want to test that I get the correct warning and error with > > the separate flags, do I have to create two separate tests for each one= ? >=20 >=20 > Yes. I tend to use letter suffixes for tests that vary only in flags > (and expected results), e.g. feature1a.C, feature1b.C. Will do. > Instead of OPT_Wpedantic, this should be controlled by > -Wc++23-extensions (OPT_Wc__23_extensions) Yeah, I'll do this. > If you wanted, you could add a more specific warning option for this > (e.g. -Wc++23-explicit-this) which is also affected by > -Wc++23-extensions, but I would lean toward just using the existing > flag. Up to you. I brought it up in irc and there was some pushback to my point of view on it, so I'll just stick with OPT_Wc__23_extensions for now. I do think a more sophisticated interface would be beneficial but I will bring discussion around that up again in the future. I've seen plenty of these G_ or _ macros on strings around like in grokfndecl for these errors. G_("static member function %qD cannot have cv-qualifier") G_("non-member function %qD cannot have cv-qualifier") G_("static member function %qD cannot have ref-qualifier") G_("non-member function %qD cannot have ref-qualifier") I have been able to figure out it relates to translation, but not exactly what the protocol around them is. I think in my original patch I had refactored this code a bunch, I figured adding a 3rd case to it justifies a refactor. I think I forgot to add those changes to the original patch, either that or I undid it or moved it somewhere else. Anyway, the point is, coming back to it now to re-add those diagnostics I realized I probably shouldn't have changed those strings. I also have been wondering whether I should be putting macros on any strings I add, it seemed like there might have been a macro for text that needs translation. Is this something I should be doing? Alex