]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Disable deprecated/unavailable diagnostics when creating thunks for methods...
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Sep 2024 16:22:21 +0000 (18:22 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 13 Jun 2025 11:34:46 +0000 (13:34 +0200)
commit7234fc38e934f8a1c6415ac49e4f690efc3feac3
tree90a85a4249265225d6fedc30f7adbedafbbc1228
parenteb4249345c1241c494f7d0b6b0f6a670e4a0b4e0
c++: Disable deprecated/unavailable diagnostics when creating thunks for methods with such attributes [PR116636]

On the following testcase, we emit false positive warnings/errors about using
the deprecated or unavailable methods when creating thunks for them, even
when nothing (in the testcase so far) actually used those.

The following patch temporarily disables that diagnostics when creating
the thunks.

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

PR c++/116636
* method.cc: Include decl.h.
(use_thunk): Temporarily change deprecated_state to
UNAVAILABLE_DEPRECATED_SUPPRESS.

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

(cherry picked from commit 4026d89d623e322920b052f7ac0d940ef267dc0f)
gcc/cp/method.cc
gcc/testsuite/g++.dg/warn/deprecated-19.C [new file with mode: 0644]