Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2223189/?format=api
{ "id": 2223189, "url": "http://patchwork.ozlabs.org/api/patches/2223189/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/ad5snYx1aOfMwLBv@redhat.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<ad5snYx1aOfMwLBv@redhat.com>", "list_archive_url": null, "date": "2026-04-14T16:34:37", "name": "[v2] c++: introduce reflection_function_template_p", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "b2c9f86038e6ceea5018f0056e76d2a2424bbabe", "submitter": { "id": 14370, "url": "http://patchwork.ozlabs.org/api/people/14370/?format=api", "name": "Marek Polacek", "email": "polacek@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/ad5snYx1aOfMwLBv@redhat.com/mbox/", "series": [ { "id": 499871, "url": "http://patchwork.ozlabs.org/api/series/499871/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499871", "date": "2026-04-14T16:34:37", "name": "[v2] c++: introduce reflection_function_template_p", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/499871/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223189/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223189/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=KyFM1YJM;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=KyFM1YJM", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fw8yt35X2z1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 02:35:13 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 1EAF04BA2E07\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 16:35:11 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id DE3EF4BA2E06\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 16:34:42 +0000 (GMT)", "from mail-qv1-f69.google.com (mail-qv1-f69.google.com\n [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-468-oKVy31yjPBSL3pB-GyMNCg-1; Tue, 14 Apr 2026 12:34:41 -0400", "by mail-qv1-f69.google.com with SMTP id\n 6a1803df08f44-89502dfd7b4so75923656d6.1\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 09:34:41 -0700 (PDT)", "from redhat.com ([2603:7000:9500:10::1db4])\n by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8ac9f56d93csm76426136d6.44.2026.04.14.09.34.38\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 14 Apr 2026 09:34:39 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 1EAF04BA2E07", "OpenDKIM Filter v2.11.0 sourceware.org DE3EF4BA2E06" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org DE3EF4BA2E06", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org DE3EF4BA2E06", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776184483; cv=none;\n b=kuVGKAMciEDceKrM3+Yye+1uKrwRULeVdiFrZZQVcq1CuDNex95x6c+VPY8/uRn77ncUPuSoWItdsnXE7hl2sVock4N6wIUuwuUvWHOE7sqDhazgLvp6+NnQEl0gMdliWbIwIOaK17ztrTxQ2+PH/FuSM3L2ferhm4heC/vde0Q=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776184483; c=relaxed/simple;\n bh=y08Jue/8tbWJoxzRqTcUIS3rIa4jvbYT9u2ONZgC56Q=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=pAQ78fS3IWq93Qko8YY8DePP+4Kayd5AHrM1FIMF6Gg2+gEYVxZBwo/EFgyxLfvVcp1v4J4t8QXxjblW/FpkK+9/O/N8xAlxNhatKkj3K5E7jX0Dokibi5oohSfzfUfn7yP8OtG4sVKMcBwubcA6Tf/zA2ey/btnidYvXbBOV6w=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1776184482;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=wszjKZuliCm4RXhQs5rlwd0+oysNpOHaZZpxpvSjUh4=;\n b=KyFM1YJMC8nk+ODvuE69ylqDx5B9WTIeXr8jjuoQCKp9vu2TlNZW62A1tJeMCxf9QaFR3g\n zaef55sHoYch/hp1DNPcGLmF2BuV4R4PC2JQCDfl9U52uNcuQ+7wxTPEgqJwvVx/f+yytT\n F7edaaGTFga5TFjONOvNg1qGfhMD8sQ=", "X-MC-Unique": "oKVy31yjPBSL3pB-GyMNCg-1", "X-Mimecast-MFC-AGG-ID": "oKVy31yjPBSL3pB-GyMNCg_1776184480", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776184480; x=1776789280;\n h=user-agent:in-reply-to:content-disposition:mime-version:references\n :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=wszjKZuliCm4RXhQs5rlwd0+oysNpOHaZZpxpvSjUh4=;\n b=lfW7OWlhm6dxf27Eh0XZ6Bgtg+lCc6NqVJOs6T+xiJXOBd4DnuHM2h8lwIKavBDJor\n GpQMOrvXhDrXnaMvyB58ZTPc1OUeOlWBLH3GBzcofv69IYssNVAC+RIMotq6CUa1tr6p\n oHpj4J2edNCqN9zFPTKGVSqkQNFgGUCobP0FCuT6BtK2+hiJqIQb1ZZzEV8hcA4q7aX0\n 4+LEX1hVdQGPl4gteNIAyt0+uugjpSVLau1CaKcHEP6FU5L+Rq95T9yJDbyzVjNNGLZy\n XgklSUZrDis1/fPqx9Mu5np/NUzac+1JLdfRU386L0pDrYpEOOVj2L3DpOj8xcQP7VsS\n wKNQ==", "X-Gm-Message-State": "AOJu0YzX/fhKwEq2zBXF5WZY3XbROUWpvF6cSHWS9Z0bG2ZVl4uwOWJt\n OlTO8oItAufAojaYBGtRQtS1/tbtqgZtKMnhT9/5YyXoHrmAC4Lc9CEM2BzTKR5DoZZVdS4mPtl\n WjYG/nyfA/bSelRGeTnWUp/TRxr6vc7pimLDGS28UGam3sbGjgSGpu8VQdy8=", "X-Gm-Gg": "AeBDietdsKa2jjLwXDcaWLQGuJzgg82FgnFZfJunVvr8Szsy1VcltPN3T0oxL/PTz+K\n i5NSsTHBUlyI4Wa8HB7ifS0eM0+cJiBhrJPBNFrpnf4rkg4pbuWNohW2tJdxLRoH4lJ5W76bO7a\n +k5Za56AvD3THh9cW4ZP540lQYbg85JEjLaLF+fSUsoqSDoJA3fLZypS3gP2/LG5AdgUFdo9VNX\n AJQtiQbBIFpVubiYzdlnR0rkrVPaJjGk4xXLmLVyw0QloAo98AsREaytqlVAu237r8vexafGeD9\n wjq/F7p0sRB1SqWSfOLGVSCGKotdhnXvxRYLdTsV3gZ7kyxAqy0dyfdV/F1ZPU1JEoO3LNj5gI5\n dyg==", "X-Received": [ "by 2002:a05:6214:3986:b0:8ac:b2b2:b2f0 with SMTP id\n 6a1803df08f44-8acb2b2c5bdmr118574556d6.1.1776184480155;\n Tue, 14 Apr 2026 09:34:40 -0700 (PDT)", "by 2002:a05:6214:3986:b0:8ac:b2b2:b2f0 with SMTP id\n 6a1803df08f44-8acb2b2c5bdmr118573946d6.1.1776184479581;\n Tue, 14 Apr 2026 09:34:39 -0700 (PDT)" ], "Date": "Tue, 14 Apr 2026 12:34:37 -0400", "From": "Marek Polacek <polacek@redhat.com>", "To": "Jason Merrill <jason@redhat.com>", "Cc": "GCC Patches <gcc-patches@gcc.gnu.org>", "Subject": "[PATCH v2] c++: introduce reflection_function_template_p", "Message-ID": "<ad5snYx1aOfMwLBv@redhat.com>", "References": "<20260414141710.99666-1-polacek@redhat.com>\n <70fc703f-14cb-4a7c-8c48-f373b8ec9fb2@redhat.com>", "MIME-Version": "1.0", "In-Reply-To": "<70fc703f-14cb-4a7c-8c48-f373b8ec9fb2@redhat.com>", "User-Agent": "Mutt/2.3.1 (2026-03-20)", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "pCNoj4111U5pv8ZRcCcfWsplI2gIQ0jeehQ4v0Gq8ZA_1776184480", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=us-ascii", "Content-Disposition": "inline", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "On Tue, Apr 14, 2026 at 12:23:25PM -0400, Jason Merrill wrote:\n> On 4/14/26 10:17 AM, Marek Polacek wrote:\n> > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?\n> > \n> > -- >8 --\n> > As discussed in\n> > <https://gcc.gnu.org/pipermail/gcc-patches/2026-April/712156.html>,\n> > this patch introduces a new predicate to be used instead of\n> > really_overloaded_fn when we're checking for a function template.\n> \n> This name is rather misleading for uses outside of reflection, given that it\n> will return true for an overload set that contains two non-templates. Let's\n> include some form of \"reflection\" in the function name.\n\nOK, I've renamed the new function to reflection_function_template_p,\nwe already have reflection_mangle_prefix and reflection_type_linkage_name.\n\nRan dg.exp=reflect/*, ok for trunk?\n\n-- >8 --\nAs discussed in\n<https://gcc.gnu.org/pipermail/gcc-patches/2026-April/712156.html>,\nthis patch introduces a new predicate to be used instead of\nreally_overloaded_fn when we're checking for a function template in the\nReflection code.\n\ngcc/cp/ChangeLog:\n\n\t* cp-tree.h (reflection_function_template_p): Declare.\n\t* parser.cc (cp_parser_splice_expression): Use\n\treflection_function_template_p instead of really_overloaded_fn.\n\t* reflect.cc (check_splice_expr): Likewise.\n\t(reflection_function_template_p): New.\n---\n gcc/cp/cp-tree.h | 1 +\n gcc/cp/parser.cc | 2 +-\n gcc/cp/reflect.cc | 12 ++++++++++--\n 3 files changed, 12 insertions(+), 3 deletions(-)\n\n\nbase-commit: 861a3dac61bb55f8f3fc10a6bea7b814262b9bf5", "diff": "diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h\nindex 1080203ac8a..c5a3a6bd39b 100644\n--- a/gcc/cp/cp-tree.h\n+++ b/gcc/cp/cp-tree.h\n@@ -9442,6 +9442,7 @@ extern tree make_splice_scope (tree, bool);\n extern bool dependent_splice_p (const_tree) ATTRIBUTE_PURE;\n extern tree reflection_mangle_prefix (tree, char [3]);\n extern void check_consteval_only_fn (tree);\n+extern bool reflection_function_template_p (tree) ATTRIBUTE_PURE;\n \n /* Inline bodies. */\n \ndiff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\nindex 9dbc2933e7b..742cfd03621 100644\n--- a/gcc/cp/parser.cc\n+++ b/gcc/cp/parser.cc\n@@ -6341,7 +6341,7 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n && (targs_p\n \t /* No 'template' but the splice-specifier designates a function\n \t template? */\n-\t || really_overloaded_fn (t))\n+\t || reflection_function_template_p (t))\n && warning_enabled_at (loc, OPT_Wmissing_template_keyword))\n /* Were 'template' present, this would be valid code, so keep going. */\n missing_template_diag (loc, diagnostics::kind::pedwarn);\ndiff --git a/gcc/cp/reflect.cc b/gcc/cp/reflect.cc\nindex 4ef340f0726..d560658378e 100644\n--- a/gcc/cp/reflect.cc\n+++ b/gcc/cp/reflect.cc\n@@ -8978,7 +8978,7 @@ check_splice_expr (location_t loc, location_t start_loc, tree t,\n \t template. */\n if (!targs_p)\n \t{\n-\t if (!really_overloaded_fn (t) && !dependent_splice_p (t))\n+\t if (!reflection_function_template_p (t) && !dependent_splice_p (t))\n \t {\n \t if (complain_p)\n \t\t{\n@@ -9005,7 +9005,7 @@ check_splice_expr (location_t loc, location_t start_loc, tree t,\n \t }\n \t return false;\n \t}\n- gcc_checking_assert (really_overloaded_fn (t)\n+ gcc_checking_assert (reflection_function_template_p (t)\n \t\t\t || get_template_info (t)\n \t\t\t || TREE_CODE (t) == TEMPLATE_ID_EXPR\n \t\t\t || variable_template_p (t)\n@@ -9197,4 +9197,12 @@ reflection_mangle_prefix (tree refl, char prefix[3])\n gcc_unreachable ();\n }\n \n+/* Returns true iff X is a function template for Reflection purposes. */\n+\n+bool\n+reflection_function_template_p (tree x)\n+{\n+ return really_overloaded_fn (x);\n+}\n+\n #include \"gt-cp-reflect.h\"\n", "prefixes": [ "v2" ] }