[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 via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126280

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <[email protected]>:

https://gcc.gnu.org/g:d47f48643b3db4e207b0cc3382f614aa76c9c2c5

commit r17-2706-gd47f48643b3db4e207b0cc3382f614aa76c9c2c5
Author: Patrick Palka <[email protected]>
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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.