[Bug c++/80598] [7/8 regression] -Wunused triggers for functions used in uninstantiated templates
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 8 21:19:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80598
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar 8 21:18:50 2018
New Revision: 258370
URL: https://gcc.gnu.org/viewcvs?rev=258370&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wunused-function4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list