]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Don't emit deprecated/unavailable attribute diagnostics when creating cdtor...
authorJakub Jelinek <jakub@redhat.com>
Fri, 13 Sep 2024 14:13:01 +0000 (16:13 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 13 Jun 2025 09:05:38 +0000 (11:05 +0200)
commitbefa6f58b627180e9b963b49c8e2a634365001da
tree81a69a8042b84848c11367c740e7addfedd7938d
parent26ed5b473d26534af4ad87ed5de2e751b216b72a
c++: Don't emit deprecated/unavailable attribute diagnostics when creating cdtor thunks [PR116678]

Another spot where we mark_used a function (in this case ctor or dtor)
even when it is just artificially used inside of thunks (emitted on mingw
with -Os for the testcase).

2024-09-13  Jakub Jelinek  <jakub@redhat.com>

PR c++/116678
* optimize.cc: Include decl.h.
(maybe_thunk_body): Temporarily change deprecated_state to
UNAVAILABLE_DEPRECATED_SUPPRESS.

* g++.dg/warn/deprecated-20.C: New test.

(cherry picked from commit b7b67732e20217196f2a13a10fc3df4605b2b2ab)
gcc/cp/optimize.cc
gcc/testsuite/g++.dg/warn/deprecated-20.C [new file with mode: 0644]