re PR c++/80598 (-Wunused triggers for functions used in uninstantiated templates)
authorJason Merrill <jason@redhat.com>
Thu, 8 Mar 2018 21:18:50 +0000 (22:18 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 8 Mar 2018 21:18:50 +0000 (22:18 +0100)
commit80bac2eb06b1f5660fa46c8b4292e01df745f398
tree80bda116f7fefdc340ee66f16cfe10618919e03d
parent86c6352c2f6d1d6dac28620d98593e4afe7ae89f
re PR c++/80598 (-Wunused triggers for functions used in uninstantiated templates)

PR c++/80598
* call.c (build_over_call): In templates set TREE_USED (first_fn) when
not calling mark_used for the benefit of -Wunused-function warning.

* g++.dg/warn/Wunused-function4.C: New test.

From-SVN: r258370
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wunused-function4.C [new file with mode: 0644]