re PR c++/84222 ([[deprecated]] class complains about internal class usage)
authorJakub Jelinek <jakub@redhat.com>
Thu, 15 Mar 2018 17:45:01 +0000 (18:45 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 15 Mar 2018 17:45:01 +0000 (18:45 +0100)
commit4a5a49b034eed5373f6968c99bda1827f1479580
tree64ed6c965d42cd863935b6a8afd5a6cb716764fe
parent8bb2726d08ae3dd89c7085a7972b5a144ccea270
re PR c++/84222 ([[deprecated]] class complains about internal class usage)

PR c++/84222
* cp-tree.h (cp_warn_deprecated_use): Declare.
* tree.c (cp_warn_deprecated_use): New function.
* typeck2.c (build_functional_cast): Use it.
* decl.c (grokparms): Likewise.
(grokdeclarator): Likewise.  Temporarily push nested class scope
around grokparms call for out of class member definitions.

* g++.dg/warn/deprecated.C (T::member3): Change dg-warning to dg-bogus.
* g++.dg/warn/deprecated-6.C (T::member3): Likewise.
* g++.dg/warn/deprecated-13.C: New test.

From-SVN: r258568
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/tree.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/deprecated-13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/deprecated-6.C
gcc/testsuite/g++.dg/warn/deprecated.C