summaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-17 22:09:27 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-17 22:09:27 +0000
commit59edbc2ae2b034ae1151e2aa93ec3f46a8f20481 (patch)
tree43393cf81b5de470bf2fc196aad45e02ec102856 /gcc/cp/parser.c
parent630c50aa193dea8521e56921e12b5cfb98ea0287 (diff)
downloadgcc-59edbc2ae2b034ae1151e2aa93ec3f46a8f20481.tar.gz
PR c++/33911
gcc/cp/ * call.c (build_call_a): Don't warn_deprecated_use here. (build_over_call): Or here. * decl2.c (mark_used): Do it here. (is_late_template_attribute): Attribute deprecated is not deferred. (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template. * parser.c (cp_parser_template_name): Warn about deprecated template. (cp_parser_template_argument): Likewise. libstdc++-v3/ * include/backward/binders.h: Suppress -Wdeprecated-declarations. * include/ext/array_allocator.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217677 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 3eff5fad862..b106f3b03cd 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -13959,7 +13959,11 @@ cp_parser_template_name (cp_parser* parser,
/* If DECL is a template, then the name was a template-name. */
if (TREE_CODE (decl) == TEMPLATE_DECL)
- ;
+ {
+ if (TREE_DEPRECATED (decl)
+ && deprecated_state != DEPRECATED_SUPPRESS)
+ warn_deprecated_use (decl, NULL_TREE);
+ }
else
{
tree fn = NULL_TREE;
@@ -14193,7 +14197,11 @@ cp_parser_template_argument (cp_parser* parser)
cp_parser_error (parser, "expected template-name");
}
if (cp_parser_parse_definitely (parser))
- return argument;
+ {
+ if (TREE_DEPRECATED (argument))
+ warn_deprecated_use (argument, NULL_TREE);
+ return argument;
+ }
/* It must be a non-type argument. There permitted cases are given
in [temp.arg.nontype]: