[Bug c++/124493] [reflection] crash with invalid splice-specialization-specifier
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 17 20:11:24 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124493
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:824538311a3afabc6e8c26500f99a218badb488f
commit r16-8141-g824538311a3afabc6e8c26500f99a218badb488f
Author: Marek Polacek <polacek@redhat.com>
Date: Tue Mar 17 12:34:28 2026 -0400
c++/reflection: add var tmpl to inform_tree_category [PR124493]
Modifying the recently added crash22.C test to use a variable template
shows that inform_tree_category doesn't say reflection of what we
actually got. With this patch we say:
⢠but 'Y<T>' is a variable template
crash23.C:6:13:
6 | constexpr T Y{};
| ^
I couldn't figure out a test for alias templates so I'm not adding
that now.
PR c++/124493
gcc/cp/ChangeLog:
* error.cc (inform_tree_category): Handle variable templates.
gcc/testsuite/ChangeLog:
* g++.dg/reflect/crash23.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
More information about the Gcc-bugs
mailing list