[{"id":3683457,"web_url":"http://patchwork.ozlabs.org/comment/3683457/","msgid":"<afC1uAszFHp1c0pr@redhat.com>","list_archive_url":null,"date":"2026-04-28T13:27:20","subject":"Re: [PATCH] c++/reflection: improve diagnostic for dependent splices","submitter":{"id":14370,"url":"http://patchwork.ozlabs.org/api/people/14370/","name":"Marek Polacek","email":"polacek@redhat.com"},"content":"Ping.\n\nOn Mon, Apr 20, 2026 at 01:08:59PM -0400, Marek Polacek wrote:\n> Tested dg.exp on x86_64-pc-linux-gnu, ok for trunk?\n> \n> -- >8 --\n> In the parser we've changed the \"not usable in a splice\" error messages\n> to the more helpful \"expected a reflection of ...\", but tsubst_splice_scope\n> still uses the former.  This patch updates the diagnostic there as well.\n> Let's also teach inform_tree_category about concepts and alias templates\n> now that a testcase exercises them.\n> \n> gcc/cp/ChangeLog:\n> \n> \t* error.cc (inform_tree_category): Also print concept and alias\n> \ttemplate.\n> \t* pt.cc (tsubst_splice_scope): Reword the diagnostic messages.\n> \tCall inform_tree_category.\n> \n> gcc/testsuite/ChangeLog:\n> \n> \t* g++.dg/reflect/ns5.C: Adjust expected diagnostics.\n> \t* g++.dg/reflect/type9.C: Likewise.\n> ---\n>  gcc/cp/error.cc                      |  4 +++\n>  gcc/cp/pt.cc                         | 16 ++++++----\n>  gcc/testsuite/g++.dg/reflect/ns5.C   | 41 ++++++++++++++++++--------\n>  gcc/testsuite/g++.dg/reflect/type9.C | 44 +++++++++++++++++++---------\n>  4 files changed, 72 insertions(+), 33 deletions(-)\n> \n> diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc\n> index e7121dc1017..2ea9d1a7bcd 100644\n> --- a/gcc/cp/error.cc\n> +++ b/gcc/cp/error.cc\n> @@ -4013,12 +4013,16 @@ inform_tree_category (tree t)\n>      inform (loc, \"but %qE is a function template\", t);\n>    else if (DECL_CLASS_TEMPLATE_P (t))\n>      inform (loc, \"but %qE is a class template\", t);\n> +  else if (DECL_ALIAS_TEMPLATE_P (t))\n> +    inform (loc, \"but %qE is an alias template\", t);\n>    else if (variable_template_p (t))\n>      inform (loc, \"but %qE is a variable template\", t);\n>    else if (TREE_CODE (t) == NAMESPACE_DECL)\n>      inform (loc, \"but %qE is a namespace\", t);\n>    else if (TREE_CODE (t) == CONST_DECL && !DECL_TEMPLATE_PARM_P (t))\n>      inform (loc, \"but %qE is an enumerator\", t);\n> +  else if (concept_definition_p (t))\n> +    inform (loc, \"but %qE is a concept\", t);\n>  }\n>  \n>  /* Disable warnings about missing quoting in GCC diagnostics for\n> diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc\n> index 2cf14e2c801..13153a7c179 100644\n> --- a/gcc/cp/pt.cc\n> +++ b/gcc/cp/pt.cc\n> @@ -16899,21 +16899,25 @@ tsubst_splice_scope (tree t, tree args, tsubst_flags_t complain, tree in_decl)\n>    tree r = tsubst (SPLICE_SCOPE_EXPR (t), args, complain, in_decl);\n>    if (r == error_mark_node)\n>      return r;\n> +  const bool type_p = SPLICE_SCOPE_TYPE_P (t);\n>    if (dependent_splice_p (r))\n> -    return make_splice_scope (r, SPLICE_SCOPE_TYPE_P (t));\n> -  if (SPLICE_SCOPE_TYPE_P (t) && ctad_template_p (r))\n> +    return make_splice_scope (r, type_p);\n> +  if (type_p && ctad_template_p (r))\n>      r = make_template_placeholder (r);\n> -  if (SPLICE_SCOPE_TYPE_P (t)\n> +  if (type_p\n>        ? !valid_splice_type_p (r)\n>        : !valid_splice_scope_p (r))\n>      {\n>        if (complain & tf_error)\n>  \t{\n>  \t  const location_t loc = EXPR_LOCATION (SPLICE_SCOPE_EXPR (t));\n> -\t  if (SPLICE_SCOPE_TYPE_P (t))\n> -\t    error_at (loc, \"%qE is not usable in a splice type\", r);\n> +\t  auto_diagnostic_group d;\n> +\t  if (type_p)\n> +\t    error_at (loc, \"expected a reflection of a type\");\n>  \t  else\n> -\t    error_at (loc, \"%qE is not usable in a splice scope\", r);\n> +\t    error_at (loc, \"expected a reflection of a class, namespace, or \"\n> +\t\t      \"enumeration\");\n> +\t  inform_tree_category (r);\n>  \t}\n>        return error_mark_node;\n>      }\n> diff --git a/gcc/testsuite/g++.dg/reflect/ns5.C b/gcc/testsuite/g++.dg/reflect/ns5.C\n> index 236b2927453..eb75481d9f1 100644\n> --- a/gcc/testsuite/g++.dg/reflect/ns5.C\n> +++ b/gcc/testsuite/g++.dg/reflect/ns5.C\n> @@ -5,12 +5,16 @@ using info = decltype(^^void);\n>  \n>  template<typename>\n>  void foo () { }\n> +template<typename>\n> +void foo2 () { }\n>  void bar () { }\n>  namespace N { }\n>  namespace M = N;\n>  template<typename T>\n>  T vt{};\n>  template<typename T>\n> +T vt2{};\n> +template<typename T>\n>  concept C = true;\n>  static int i;\n>  enum E { X };\n> @@ -20,23 +24,34 @@ struct D { static T di; };\n>  template<typename T>\n>  using Z = D<T>;\n>  \n> -template<info R> void fn1 () { typename [:R:]::X x; }\t// { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn2 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn3 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn4 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn5 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn6 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn7 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn8 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn9 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn10 () { typename [:R:]::X x; }  // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn11 () { typename [:R:]::X x; }  // { dg-error \"not usable in a splice scope\" }\n> +template<info R> void fn1 () { typename [:R:]::X x; }\t// { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .foo<int>. is a function\" \"\" { target *-*-* } 7 }\n> +template<info R> void fn2 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .foo2. is a function template\" \"\" { target *-*-* } 9 }\n> +template<info R> void fn3 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .bar. is a function\" \"\" { target *-*-* } 10 }\n> +template<info R> void fn4 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .vt<int>. is a variable\" \"\" { target *-*-* } 14 }\n> +template<info R> void fn5 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .vt2<T>. is a variable template\" \"\" { target *-*-* } 16 }\n> +template<info R> void fn6 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .C. is a concept\" \"\" { target *-*-* } 18 }\n> +template<info R> void fn7 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .i. is a variable\" \"\" { target *-*-* } 19 }\n> +template<info R> void fn8 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .X. is an enumerator\" \"\" { target *-*-* } 20 }\n> +template<info R> void fn9 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .S::si. is a variable\" \"\" { target *-*-* } 21 }\n> +template<info R> void fn10 () { typename [:R:]::X x; }  // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .D<int>::di. is a variable\" \"\" { target *-*-* } 23 }\n> +template<info R> void fn11 () { typename [:R:]::X x; }  // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .Z. is an alias template\" \"\" { target *-*-* } 25 }\n>  \n>  template void fn1<^^foo<int>>(); // { dg-message \"required from here\" }\n> -template void fn2<^^foo>();\t // { dg-message \"required from here\" }\n> +template void fn2<^^foo2>();\t // { dg-message \"required from here\" }\n>  template void fn3<^^bar>();\t // { dg-message \"required from here\" }\n>  template void fn4<^^vt<int>>();  // { dg-message \"required from here\" }\n> -template void fn5<^^vt>();\t // { dg-message \"required from here\" }\n> +template void fn5<^^vt2>();\t // { dg-message \"required from here\" }\n>  template void fn6<^^C>();\t // { dg-message \"required from here\" }\n>  template void fn7<^^i>();\t // { dg-message \"required from here\" }\n>  template void fn8<^^X>();\t // { dg-message \"required from here\" }\n> diff --git a/gcc/testsuite/g++.dg/reflect/type9.C b/gcc/testsuite/g++.dg/reflect/type9.C\n> index 2d0409e4b86..99c6fd2781b 100644\n> --- a/gcc/testsuite/g++.dg/reflect/type9.C\n> +++ b/gcc/testsuite/g++.dg/reflect/type9.C\n> @@ -5,12 +5,16 @@ using info = decltype(^^void);\n>  \n>  template<typename>\n>  void foo () { }\n> +template<typename>\n> +void foo2 () { }\n>  void bar () { }\n>  namespace N { }\n>  namespace M = N;\n>  template<typename T>\n>  T vt{};\n>  template<typename T>\n> +T vt2{};\n> +template<typename T>\n>  concept C = true;\n>  static int i;\n>  enum E { X };\n> @@ -20,27 +24,39 @@ struct D { static T di; };\n>  template<typename T>\n>  using Z = D<T>;\n>  \n> -template<info R> void fn1 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn2 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn3 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn4 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn5 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn6 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn7 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn8 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn9 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn10 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn11 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn12 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> +template<info R> void fn1 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .foo<int>. is a function\" \"\" { target *-*-* } 7 }\n> +template<info R> void fn2 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .foo2. is a function template\" \"\" { target *-*-* } 9 }\n> +template<info R> void fn3 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .N. is a namespace\" \"\" { target *-*-* } 11 }\n> +template<info R> void fn4 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .M. is a namespace\" \"\" { target *-*-* } 12 }\n> +template<info R> void fn5 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .bar. is a function\" \"\" { target *-*-* } 10 }\n> +template<info R> void fn6 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .vt<int>. is a variable\" \"\" { target *-*-* } 14 }\n> +template<info R> void fn7 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .vt2<T>. is a variable template\" \"\" { target *-*-* } 16 }\n> +template<info R> void fn8 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .C. is a concept\" \"\" { target *-*-* } 18 }\n> +template<info R> void fn9 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .i. is a variable\" \"\" { target *-*-* } 19 }\n> +template<info R> void fn10 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .X. is an enumerator\" \"\" { target *-*-* } 20 }\n> +template<info R> void fn11 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .S::si. is a variable\" \"\" { target *-*-* } 21 }\n> +template<info R> void fn12 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .D<int>::di. is a variable\" \"\" { target *-*-* } 23 }\n>  template<info R> void fn13 () { int n = typename [:R:](42); } // { dg-error \"class template argument deduction failed|no matching\" }\n>  \n>  template void fn1<^^foo<int>>();  // { dg-message \"required from here\" }\n> -template void fn2<^^foo>();\t  // { dg-message \"required from here\" }\n> +template void fn2<^^foo2>();\t  // { dg-message \"required from here\" }\n>  template void fn3<^^N>();\t  // { dg-message \"required from here\" }\n>  template void fn4<^^M>();\t  // { dg-message \"required from here\" }\n>  template void fn5<^^bar>();\t  // { dg-message \"required from here\" }\n>  template void fn6<^^vt<int>>();\t  // { dg-message \"required from here\" }\n> -template void fn7<^^vt>();\t  // { dg-message \"required from here\" }\n> +template void fn7<^^vt2>();\t  // { dg-message \"required from here\" }\n>  template void fn8<^^C>();\t  // { dg-message \"required from here\" }\n>  template void fn9<^^i>();\t  // { dg-message \"required from here\" }\n>  template void fn10<^^X>();\t  // { dg-message \"required from here\" }\n> \n> base-commit: 8e6b7c97232489557e376bdc134ad69aaeb35794\n> -- \n> 2.53.0\n> \n\nMarek","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=FYYIVc7T;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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=FYYIVc7T","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.129.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4g4h8P5sJjz1xrS\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 23:28:20 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id AD1344BB593A\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 13:28:18 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id C44BF4BB3BFC\n for <gcc-patches@gcc.gnu.org>; Tue, 28 Apr 2026 13:27:48 +0000 (GMT)","from mail-qv1-f72.google.com (mail-qv1-f72.google.com\n [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-527-Y1EGKk6aMPmtpN_ejnUmuA-1; Tue, 28 Apr 2026 09:27:42 -0400","by mail-qv1-f72.google.com with SMTP id\n 6a1803df08f44-8a5f6110c1cso268178356d6.0\n for <gcc-patches@gcc.gnu.org>; Tue, 28 Apr 2026 06:27:41 -0700 (PDT)","from redhat.com ([2603:7002:1f00:31d2::1db4])\n by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8b3e2956ab0sm19580076d6.26.2026.04.28.06.27.21\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Apr 2026 06:27:21 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org AD1344BB593A","OpenDKIM Filter v2.11.0 sourceware.org C44BF4BB3BFC"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org C44BF4BB3BFC","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org C44BF4BB3BFC","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777382868; cv=none;\n b=jIEpQ3QpQuJahax7QwzVZTqdOWK0FkOzOY/a9xjA4ovgAkwTEEPKREYif8M7FzZEX8DACLwtBI3pCGpEHaeDrPHhoYLKEC3RmkIdaehXw0wYrRy316Bp7FAZV2BMWQ2zIN9JjKdgN9hW9NrWiSdonglYVWEBgiiTfK8vtV3YOko=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777382868; c=relaxed/simple;\n bh=7v95fq2+XyMEdohsbJRwQFCOSeberplCXN7TJXwNRsc=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=WSlq8rrZ+SMNew42RTaZnJ20YkhDiujUwZpchC/fniBlPx5TF8JSEkoW2BiiQr3tcoT3T0HCr/FpjLHQX5x8R0KFTT/JW8QQOdMe+hlX0ZhQMEFUpjBJbZ7ftPcYXgipP5I5BuUx1iPkuYObg4QAA4REufVWzW7aEanZINz0ZvQ=","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=1777382868;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=oKIjf2hvSd6FVX3Hp7KfA2IaLyXHMC2cLcFO7mUYd9I=;\n b=FYYIVc7TsKlEex25wE+LPg42l+0eFoqXaR7TP2b8wUgFubBtxQR/B6KuOPTRlkV2KtEPg+\n jnOhJxDluu1d/5SBUej/0Y3W3rOhhP88DRnglSNvzLGM/5PjMhGCqJ9oRnhwtCPgzP/QLw\n 6/593Zdxt6f2ZG7uA33ht2BeCSEPnTo=","X-MC-Unique":"Y1EGKk6aMPmtpN_ejnUmuA-1","X-Mimecast-MFC-AGG-ID":"Y1EGKk6aMPmtpN_ejnUmuA_1777382861","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777382860; x=1777987660;\n h=user-agent:in-reply-to:content-disposition:mime-version:references\n :message-id:subject:to:from:date:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=oKIjf2hvSd6FVX3Hp7KfA2IaLyXHMC2cLcFO7mUYd9I=;\n b=aKPDeU09wnno/pMfR7GOtJGwwckc01d9j5ezagWeTP9TR/tuvYMXnWMPgv42Sn9ac8\n xEk+gYf11QnzStya48AhnYNsxIkbcHX7WaJboPft4f3i+7Mkddm04X1oImwZ1o634U4u\n LJM1OYgkZY00GpqQKPL6ON4uBbYZ4/i6rcru9Iif+DKDHmemLG1K8TPf5evhCW7Em2qe\n 7QwDIWgKkHaUgodAYejHuArAemFSveDTMYz7QdavY8FmIXF3ljRhaR9h40pfz3321liS\n XQmOWs0dNUCpgOD4BU4JQPRz2F57Bq/qAX4b6LVt49ZGnfp9IKRqkiC5K6TJ/QSYwvPo\n J4Yg==","X-Forwarded-Encrypted":"i=1;\n AFNElJ++oCmS1kr0EMu7tP5O1VJT/B0pTzOM8bIlcQXmCbmPwOOiFRLCetAPg2LOd2sh5TVrbOKIX0yBBjYTog==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YwzJC5Ggi4tfSjcTSUtitiW97q3rDwszrdF+hctGoTDHtea5/PG\n 7qAcvL8S4uB3BwttOx3RaOTQ8+3RJ2yb7xbu+v5dtRBGgeinB3nlprioRGCFI1hZHzeT18llf3P\n lDbEh2O+7bv7PcZDvCYmNnbxNuhtVxlMkqnS1EXbCrGkKG/AasdFk9p1q3VhdyXIP82I=","X-Gm-Gg":"AeBDietvg/JD/wehJwxYb4cBVaQiwTpzJj9ulDqMw5WbS5vXWrQ4fINZwW+Hxwb9Yh1\n T1B5V+AvUwE7svITsXn3cU9ecKQ8AadwjhFEBnxWq1PjgUNWlDhtyf5NVTqyaTihJAg4377xh8y\n VC7ag9yDQzCdqXmBYvLMDCyOA4ma2sHDQsG/kGqJK6zZXDxhz/m5wP8mBNtE6rXuRPynSGgx2Qx\n RUX/b9reNEUpNY7maMfyuiM5l7qAok+cI7iC1/lkC/fjJheaaujITTQGREGL6S/r8bF3NT8f00f\n tzTkt+C674+AQuHx+80zYQDOtlr2q8p4ZFj3uSssPPtPJuCg0OxrEvZTja9PMr+TbNR/oF5YE2Q\n QlgwGlL4i07p0UzI=","X-Received":["by 2002:a05:6214:acf:b0:8ac:b1ad:3a1a with SMTP id\n 6a1803df08f44-8b3e31aa89fmr48695056d6.36.1777382855794;\n Tue, 28 Apr 2026 06:27:35 -0700 (PDT)","by 2002:a05:6214:acf:b0:8ac:b1ad:3a1a with SMTP id\n 6a1803df08f44-8b3e31aa89fmr48682006d6.36.1777382842645;\n Tue, 28 Apr 2026 06:27:22 -0700 (PDT)"],"Date":"Tue, 28 Apr 2026 09:27:20 -0400","From":"Marek Polacek <polacek@redhat.com>","To":"Jason Merrill <jason@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>","Subject":"Re: [PATCH] c++/reflection: improve diagnostic for dependent splices","Message-ID":"<afC1uAszFHp1c0pr@redhat.com>","References":"<20260420170859.370095-1-polacek@redhat.com>","MIME-Version":"1.0","In-Reply-To":"<20260420170859.370095-1-polacek@redhat.com>","User-Agent":"Mutt/2.3.1 (2026-03-20)","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"eX_9zEejPX7p2SbezBZzRX4vRE-IaQE4oZ-ScX2PPks_1777382861","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"}},{"id":3683680,"web_url":"http://patchwork.ozlabs.org/comment/3683680/","msgid":"<b70424e2-eedd-4f19-a3d2-3ef7e81aa050@redhat.com>","list_archive_url":null,"date":"2026-04-28T19:13:05","subject":"Re: [PATCH] c++/reflection: improve diagnostic for dependent splices","submitter":{"id":4337,"url":"http://patchwork.ozlabs.org/api/people/4337/","name":"Jason Merrill","email":"jason@redhat.com"},"content":"On 4/20/26 1:08 PM, Marek Polacek wrote:\n> Tested dg.exp on x86_64-pc-linux-gnu, ok for trunk?\n\nOK.\n\n> -- >8 --\n> In the parser we've changed the \"not usable in a splice\" error messages\n> to the more helpful \"expected a reflection of ...\", but tsubst_splice_scope\n> still uses the former.  This patch updates the diagnostic there as well.\n> Let's also teach inform_tree_category about concepts and alias templates\n> now that a testcase exercises them.\n> \n> gcc/cp/ChangeLog:\n> \n> \t* error.cc (inform_tree_category): Also print concept and alias\n> \ttemplate.\n> \t* pt.cc (tsubst_splice_scope): Reword the diagnostic messages.\n> \tCall inform_tree_category.\n> \n> gcc/testsuite/ChangeLog:\n> \n> \t* g++.dg/reflect/ns5.C: Adjust expected diagnostics.\n> \t* g++.dg/reflect/type9.C: Likewise.\n> ---\n>   gcc/cp/error.cc                      |  4 +++\n>   gcc/cp/pt.cc                         | 16 ++++++----\n>   gcc/testsuite/g++.dg/reflect/ns5.C   | 41 ++++++++++++++++++--------\n>   gcc/testsuite/g++.dg/reflect/type9.C | 44 +++++++++++++++++++---------\n>   4 files changed, 72 insertions(+), 33 deletions(-)\n> \n> diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc\n> index e7121dc1017..2ea9d1a7bcd 100644\n> --- a/gcc/cp/error.cc\n> +++ b/gcc/cp/error.cc\n> @@ -4013,12 +4013,16 @@ inform_tree_category (tree t)\n>       inform (loc, \"but %qE is a function template\", t);\n>     else if (DECL_CLASS_TEMPLATE_P (t))\n>       inform (loc, \"but %qE is a class template\", t);\n> +  else if (DECL_ALIAS_TEMPLATE_P (t))\n> +    inform (loc, \"but %qE is an alias template\", t);\n>     else if (variable_template_p (t))\n>       inform (loc, \"but %qE is a variable template\", t);\n>     else if (TREE_CODE (t) == NAMESPACE_DECL)\n>       inform (loc, \"but %qE is a namespace\", t);\n>     else if (TREE_CODE (t) == CONST_DECL && !DECL_TEMPLATE_PARM_P (t))\n>       inform (loc, \"but %qE is an enumerator\", t);\n> +  else if (concept_definition_p (t))\n> +    inform (loc, \"but %qE is a concept\", t);\n>   }\n>   \n>   /* Disable warnings about missing quoting in GCC diagnostics for\n> diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc\n> index 2cf14e2c801..13153a7c179 100644\n> --- a/gcc/cp/pt.cc\n> +++ b/gcc/cp/pt.cc\n> @@ -16899,21 +16899,25 @@ tsubst_splice_scope (tree t, tree args, tsubst_flags_t complain, tree in_decl)\n>     tree r = tsubst (SPLICE_SCOPE_EXPR (t), args, complain, in_decl);\n>     if (r == error_mark_node)\n>       return r;\n> +  const bool type_p = SPLICE_SCOPE_TYPE_P (t);\n>     if (dependent_splice_p (r))\n> -    return make_splice_scope (r, SPLICE_SCOPE_TYPE_P (t));\n> -  if (SPLICE_SCOPE_TYPE_P (t) && ctad_template_p (r))\n> +    return make_splice_scope (r, type_p);\n> +  if (type_p && ctad_template_p (r))\n>       r = make_template_placeholder (r);\n> -  if (SPLICE_SCOPE_TYPE_P (t)\n> +  if (type_p\n>         ? !valid_splice_type_p (r)\n>         : !valid_splice_scope_p (r))\n>       {\n>         if (complain & tf_error)\n>   \t{\n>   \t  const location_t loc = EXPR_LOCATION (SPLICE_SCOPE_EXPR (t));\n> -\t  if (SPLICE_SCOPE_TYPE_P (t))\n> -\t    error_at (loc, \"%qE is not usable in a splice type\", r);\n> +\t  auto_diagnostic_group d;\n> +\t  if (type_p)\n> +\t    error_at (loc, \"expected a reflection of a type\");\n>   \t  else\n> -\t    error_at (loc, \"%qE is not usable in a splice scope\", r);\n> +\t    error_at (loc, \"expected a reflection of a class, namespace, or \"\n> +\t\t      \"enumeration\");\n> +\t  inform_tree_category (r);\n>   \t}\n>         return error_mark_node;\n>       }\n> diff --git a/gcc/testsuite/g++.dg/reflect/ns5.C b/gcc/testsuite/g++.dg/reflect/ns5.C\n> index 236b2927453..eb75481d9f1 100644\n> --- a/gcc/testsuite/g++.dg/reflect/ns5.C\n> +++ b/gcc/testsuite/g++.dg/reflect/ns5.C\n> @@ -5,12 +5,16 @@ using info = decltype(^^void);\n>   \n>   template<typename>\n>   void foo () { }\n> +template<typename>\n> +void foo2 () { }\n>   void bar () { }\n>   namespace N { }\n>   namespace M = N;\n>   template<typename T>\n>   T vt{};\n>   template<typename T>\n> +T vt2{};\n> +template<typename T>\n>   concept C = true;\n>   static int i;\n>   enum E { X };\n> @@ -20,23 +24,34 @@ struct D { static T di; };\n>   template<typename T>\n>   using Z = D<T>;\n>   \n> -template<info R> void fn1 () { typename [:R:]::X x; }\t// { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn2 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn3 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn4 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn5 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn6 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn7 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn8 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn9 () { typename [:R:]::X x; }   // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn10 () { typename [:R:]::X x; }  // { dg-error \"not usable in a splice scope\" }\n> -template<info R> void fn11 () { typename [:R:]::X x; }  // { dg-error \"not usable in a splice scope\" }\n> +template<info R> void fn1 () { typename [:R:]::X x; }\t// { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .foo<int>. is a function\" \"\" { target *-*-* } 7 }\n> +template<info R> void fn2 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .foo2. is a function template\" \"\" { target *-*-* } 9 }\n> +template<info R> void fn3 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .bar. is a function\" \"\" { target *-*-* } 10 }\n> +template<info R> void fn4 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .vt<int>. is a variable\" \"\" { target *-*-* } 14 }\n> +template<info R> void fn5 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .vt2<T>. is a variable template\" \"\" { target *-*-* } 16 }\n> +template<info R> void fn6 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .C. is a concept\" \"\" { target *-*-* } 18 }\n> +template<info R> void fn7 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .i. is a variable\" \"\" { target *-*-* } 19 }\n> +template<info R> void fn8 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .X. is an enumerator\" \"\" { target *-*-* } 20 }\n> +template<info R> void fn9 () { typename [:R:]::X x; }   // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .S::si. is a variable\" \"\" { target *-*-* } 21 }\n> +template<info R> void fn10 () { typename [:R:]::X x; }  // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .D<int>::di. is a variable\" \"\" { target *-*-* } 23 }\n> +template<info R> void fn11 () { typename [:R:]::X x; }  // { dg-error \"expected a reflection of a class, namespace, or enumeration\" }\n> +// { dg-message \"but .Z. is an alias template\" \"\" { target *-*-* } 25 }\n>   \n>   template void fn1<^^foo<int>>(); // { dg-message \"required from here\" }\n> -template void fn2<^^foo>();\t // { dg-message \"required from here\" }\n> +template void fn2<^^foo2>();\t // { dg-message \"required from here\" }\n>   template void fn3<^^bar>();\t // { dg-message \"required from here\" }\n>   template void fn4<^^vt<int>>();  // { dg-message \"required from here\" }\n> -template void fn5<^^vt>();\t // { dg-message \"required from here\" }\n> +template void fn5<^^vt2>();\t // { dg-message \"required from here\" }\n>   template void fn6<^^C>();\t // { dg-message \"required from here\" }\n>   template void fn7<^^i>();\t // { dg-message \"required from here\" }\n>   template void fn8<^^X>();\t // { dg-message \"required from here\" }\n> diff --git a/gcc/testsuite/g++.dg/reflect/type9.C b/gcc/testsuite/g++.dg/reflect/type9.C\n> index 2d0409e4b86..99c6fd2781b 100644\n> --- a/gcc/testsuite/g++.dg/reflect/type9.C\n> +++ b/gcc/testsuite/g++.dg/reflect/type9.C\n> @@ -5,12 +5,16 @@ using info = decltype(^^void);\n>   \n>   template<typename>\n>   void foo () { }\n> +template<typename>\n> +void foo2 () { }\n>   void bar () { }\n>   namespace N { }\n>   namespace M = N;\n>   template<typename T>\n>   T vt{};\n>   template<typename T>\n> +T vt2{};\n> +template<typename T>\n>   concept C = true;\n>   static int i;\n>   enum E { X };\n> @@ -20,27 +24,39 @@ struct D { static T di; };\n>   template<typename T>\n>   using Z = D<T>;\n>   \n> -template<info R> void fn1 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn2 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn3 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn4 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn5 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn6 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn7 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn8 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn9 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn10 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn11 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> -template<info R> void fn12 () { int n = typename [:R:](42); } // { dg-error \"not usable in a splice type\" }\n> +template<info R> void fn1 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .foo<int>. is a function\" \"\" { target *-*-* } 7 }\n> +template<info R> void fn2 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .foo2. is a function template\" \"\" { target *-*-* } 9 }\n> +template<info R> void fn3 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .N. is a namespace\" \"\" { target *-*-* } 11 }\n> +template<info R> void fn4 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .M. is a namespace\" \"\" { target *-*-* } 12 }\n> +template<info R> void fn5 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .bar. is a function\" \"\" { target *-*-* } 10 }\n> +template<info R> void fn6 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .vt<int>. is a variable\" \"\" { target *-*-* } 14 }\n> +template<info R> void fn7 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .vt2<T>. is a variable template\" \"\" { target *-*-* } 16 }\n> +template<info R> void fn8 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .C. is a concept\" \"\" { target *-*-* } 18 }\n> +template<info R> void fn9 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .i. is a variable\" \"\" { target *-*-* } 19 }\n> +template<info R> void fn10 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .X. is an enumerator\" \"\" { target *-*-* } 20 }\n> +template<info R> void fn11 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .S::si. is a variable\" \"\" { target *-*-* } 21 }\n> +template<info R> void fn12 () { int n = typename [:R:](42); } // { dg-error \"expected a reflection of a type\" }\n> +// { dg-message \"but .D<int>::di. is a variable\" \"\" { target *-*-* } 23 }\n>   template<info R> void fn13 () { int n = typename [:R:](42); } // { dg-error \"class template argument deduction failed|no matching\" }\n>   \n>   template void fn1<^^foo<int>>();  // { dg-message \"required from here\" }\n> -template void fn2<^^foo>();\t  // { dg-message \"required from here\" }\n> +template void fn2<^^foo2>();\t  // { dg-message \"required from here\" }\n>   template void fn3<^^N>();\t  // { dg-message \"required from here\" }\n>   template void fn4<^^M>();\t  // { dg-message \"required from here\" }\n>   template void fn5<^^bar>();\t  // { dg-message \"required from here\" }\n>   template void fn6<^^vt<int>>();\t  // { dg-message \"required from here\" }\n> -template void fn7<^^vt>();\t  // { dg-message \"required from here\" }\n> +template void fn7<^^vt2>();\t  // { dg-message \"required from here\" }\n>   template void fn8<^^C>();\t  // { dg-message \"required from here\" }\n>   template void fn9<^^i>();\t  // { dg-message \"required from here\" }\n>   template void fn10<^^X>();\t  // { dg-message \"required from here\" }\n> \n> base-commit: 8e6b7c97232489557e376bdc134ad69aaeb35794","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=MnTjIVkl;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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=MnTjIVkl","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.129.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4g4qpt0sp4z1xrS\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 05:13:41 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 06E094BA79A4\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 19:13:40 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 0930E4BA23D2\n for <gcc-patches@gcc.gnu.org>; Tue, 28 Apr 2026 19:13:11 +0000 (GMT)","from mail-vk1-f200.google.com (mail-vk1-f200.google.com\n [209.85.221.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-283-p8l5gRl8OzOgkGEQiD1-7g-1; Tue, 28 Apr 2026 15:13:09 -0400","by mail-vk1-f200.google.com with SMTP id\n 71dfb90a1353d-56ae34d6738so18749357e0c.3\n for <gcc-patches@gcc.gnu.org>; Tue, 28 Apr 2026 12:13:09 -0700 (PDT)","from [192.168.50.130]\n (130-44-146-247.s12789.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com.\n [130.44.146.247]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8b3eeb18e0fsm1260556d6.39.2026.04.28.12.13.06\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Tue, 28 Apr 2026 12:13:07 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 06E094BA79A4","OpenDKIM Filter v2.11.0 sourceware.org 0930E4BA23D2"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 0930E4BA23D2","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 0930E4BA23D2","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777403591; cv=none;\n b=W2kurbsCRrWsIsjosgzSqHtzBFwNhAEf63gemy8unCll/i+OQtSejkJGW/JSnvrl0rWrJ+QQ3sTRO6PPA9ojAQqoacPuyrONq+oU5vZMgiWFI/BrojMNzKesCJMSi4TvmQXgEH5MYitWzI2P7wMDCzfEaZUGhsbx7uuYm9WiSfQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777403591; c=relaxed/simple;\n bh=ixLcpmsWIG8eicSDr87pkUxKe7TMK3i2m+elYixcS30=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;\n b=uZc+LY0UY+14fDDCC1uw23+GT0yj5/e0v71I0tNDr+hjRZ+L+jOG0K1bbjXT8rs3U9fWCk3BbDYkegev08DaxpCFx6kAaXrt+CNparPQpf8IL1GeQzBoo41E4K/asP4IFX3FegPNOlj4bpiuKzCqFHwxrh0gNmfkXRBxqxKaE/s=","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=1777403590;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=bNwKLjEF0bHhnQzYvPf88hlvMHJATYRUXm+ePf7c/Cc=;\n b=MnTjIVklpD2gjoVSaqcHTFad/GPdPVXPxMwbX/XeIBuxqTiv8cNz0XkE9V9R6CCmH2etWV\n wuCJW9zuXdSyoFa22UqlepVHMi9wfqCLS2U76RKFwQciFO2Sc4X8Exa2pf560Um0sGj+iY\n Ulf7BWPJAhioAnzMzIc8rq1lHw/bC8Y=","X-MC-Unique":"p8l5gRl8OzOgkGEQiD1-7g-1","X-Mimecast-MFC-AGG-ID":"p8l5gRl8OzOgkGEQiD1-7g_1777403588","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777403588; x=1778008388;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=bNwKLjEF0bHhnQzYvPf88hlvMHJATYRUXm+ePf7c/Cc=;\n b=VlwWvVPhgW6YEc/usaXIraDh5N2NyE6p1d5LusL6vKrQzPMy+sxsMBH2MpunVgsBk/\n bxqK9L8/sJWw/vIEs/WTKdaSsHOKwj/fvNGvtxx9UWFHZTWRwDYPOJjAaU3HWrsrk0Z/\n jjb5z+cX9RK/T5ml9F9OGfGanYdKglk0y6/BYn878345fMCgQfu+9NQbYxRIsBwM1V0a\n +VGJWJQhK3tY271IeS5IABv4IoMWFwcIV+hUQzXeaC3EQDq3AtVvG7Esz5JecX1UIEie\n 29Jvt9up5WumMOjkS9DP/1/eYrWLcn0XRKEMGuhNTNbTlRhGCCL75RNl+eiP2TJFxKuo\n NTxg==","X-Forwarded-Encrypted":"i=1;\n AFNElJ+gVA5QEzqvx0UFzU16VzD74PlLf0sOt8o2zN7G9jKLwis6Vix2mCBC7K5tn7quB1RwacT7F3/YTQVxXg==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YxMfrBVEbkYHw9NUqGK+429T5zDhxEkhFQJNhnK5mE5c6crBzJX\n y3sC5Qpp99Ln3Ook/u+h1MP1Jq+ccBtmDOX3LU8T5dnTO+OFZDkiRhX7PkRWMBHX5FxRyPE2pH3\n RUDWXaReJiwwIE9ZgRss/OZ+BuRtMMkVujbhy3w1cknANs/DTsKTnksn7Osg=","X-Gm-Gg":"AeBDies2FiUkukZAMZLDKr3fCPEKNWug3LmeUfCUdwyyexKguAP2tj6skRuPGxp7lVw\n ICdruy3MdLYiIEsjrb2oEwoHm4UtjxyKTvw0BL+SjQeenQO6uYRJ5KOZsFiHKtxJXep0zVM+egO\n C5eNT4qvO+R9F4+fRMPPGgV52HRb0MwYgfoSYI/xRxOROx7XN4KPIHvIsRmyEouXfdYB97SRx75\n CD8m96gM2lA5lcRmyJFbJDI7VBmxNoqr1Wp2c04oDxz3Vq91KvFVTv/tpdqtJIPGBzw8CfF8EUv\n M4lYbOnrwceni1MxAPmqkPZYmgHUixpSy1Eiwu/FfxZbiZgdF3mmYkToWb4gu+swGs2B5G9Cpy2\n kahncwumvzImum8qoOzCuXb/gTWnm1wBGy0i0XnCbZjsTgbZ/l5Qb/qyIOLVe92PRNtgdlq5PFA\n Bzl7wWcbh7CvmWOKJ/EJU5odOHDPSFkJSfAwhuhrdYrLigfliRx+pm","X-Received":["by 2002:a05:6122:4d83:b0:56d:b337:4709 with SMTP id\n 71dfb90a1353d-573b34b9ea4mr571678e0c.6.1777403588449;\n Tue, 28 Apr 2026 12:13:08 -0700 (PDT)","by 2002:a05:6122:4d83:b0:56d:b337:4709 with SMTP id\n 71dfb90a1353d-573b34b9ea4mr571566e0c.6.1777403587794;\n Tue, 28 Apr 2026 12:13:07 -0700 (PDT)"],"Message-ID":"<b70424e2-eedd-4f19-a3d2-3ef7e81aa050@redhat.com>","Date":"Tue, 28 Apr 2026 15:13:05 -0400","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] c++/reflection: improve diagnostic for dependent splices","To":"Marek Polacek <polacek@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>","References":"<20260420170859.370095-1-polacek@redhat.com>","From":"Jason Merrill <jason@redhat.com>","In-Reply-To":"<20260420170859.370095-1-polacek@redhat.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"-crjGUVpS6HX2RzxMfjstjYWb7qP_QqrGrGkt_eK35I_1777403588","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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"}}]