c++: Avoid unnecessary deprecated warnings.
authorJason Merrill <jason@redhat.com>
Mon, 11 May 2020 18:05:46 +0000 (14:05 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 11 May 2020 18:50:13 +0000 (14:50 -0400)
commit3a3e1ea9c674e50e402d5410970411ea6590f630
tree7f8b28a65a9016b5d7d15f38c30b4c1a46d78e91
parent2b2d298ff845ab7a07ffbd51da79473736da3324
c++: Avoid unnecessary deprecated warnings.

There's no need to warn that a deprecated function uses a deprecated type,
that just adds noise.  We were preventing that in start_decl, but that
didn't help member declarations that go through grokfield.  So handle it in
grokdeclarator instead, which is shared between them.

gcc/cp/ChangeLog
2020-05-11  Jason Merrill  <jason@redhat.com>

* decl.c (grokdeclarator): Adjust deprecated_state here.
(start_decl): Not here.
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/g++.dg/warn/deprecated-6.C
gcc/testsuite/g++.dg/warn/deprecated.C