https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93228
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-8 branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:ef2e6135591f2a197d4fb8a7dbb8425a9d2df85e commit r8-10005-gef2e6135591f2a197d4fb8a7dbb8425a9d2df85e Author: Jakub Jelinek <ja...@redhat.com> Date: Fri Feb 14 15:39:57 2020 +0100 c++: Fix deprecated attribute handling on templates (PR c++/93228) As the following testcase shows, when deprecated attribute is on a template, we'd never print the message if any, because the attribute is not present on the TEMPLATE_DECL with which warn_deprecated_use is called, but on its DECL_TEMPLATE_RESULT or its type. 2020-01-17 Jakub Jelinek <ja...@redhat.com> PR c++/93228 * parser.c (cp_parser_template_name): Look up deprecated attribute in DECL_TEMPLATE_RESULT or its type's attributes. * g++.dg/cpp1y/attr-deprecated-3.C: New test.