[Bug c++/126280] [13/14/15/16/17 Regression] "used but never defined" warning for function template used in variadic template from a template
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 3 22:58:40 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126280
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:e92b45c79979f75402fc292e610e775bca34b344
commit r13-10505-ge92b45c79979f75402fc292e610e775bca34b344
Author: Patrick Palka <ppalka@redhat.com>
Date: Sat Jul 25 16:12:19 2026 -0400
c++: function NTTP argument in pack considered unused [PR126280]
This is just the pack version of PR c++/105848, in which our non-dependent
call pruning may cause us to not mark an otherwise unused function pointer
template argument within a pack as used.
PR c++/126280
gcc/cp/ChangeLog:
* pt.cc (mark_template_arguments_used): Split out loop into ...
(mark_template_arguments_used_1): ... here. Recurse into
argument packs.
gcc/testsuite/ChangeLog:
* g++.dg/template/fn-ptr6.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
(cherry picked from commit d47f48643b3db4e207b0cc3382f614aa76c9c2c5)
More information about the Gcc-bugs
mailing list