diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-01-17 15:22:22 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-01-17 15:22:22 +0100 |
commit | c60a18f8056facdcf370ce0e5f51550c9df5b539 (patch) | |
tree | 0b33341d57589da0a9bf0d8f477bc4f4e3f1a2f9 /libcpp | |
parent | bf09d886a4be1031f7003073115af6cbc5575353 (diff) | |
download | gcc-c60a18f8056facdcf370ce0e5f51550c9df5b539.zip gcc-c60a18f8056facdcf370ce0e5f51550c9df5b539.tar.gz gcc-c60a18f8056facdcf370ce0e5f51550c9df5b539.tar.bz2 |
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 <jakub@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.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions