https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116606
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:d9d34f9a91371dea4bab0b54b2d7f762a6cc23e0 commit r15-3493-gd9d34f9a91371dea4bab0b54b2d7f762a6cc23e0 Author: Marek Polacek <pola...@redhat.com> Date: Thu Sep 5 13:01:59 2024 -0400 c++: vtable referring to "unavailable" virtual fn [PR116606] mark_vtable_entries already has /* It's OK for the vtable to refer to deprecated virtual functions. */ warning_sentinel w(warn_deprecated_decl); but that doesn't cover __attribute__((unavailable)). We can use the following override to cover both. PR c++/116606 gcc/cp/ChangeLog: * decl2.cc (mark_vtable_entries): Temporarily override deprecated_state to UNAVAILABLE_DEPRECATED_SUPPRESS. Remove a warning_sentinel. gcc/testsuite/ChangeLog: * g++.dg/ext/attr-unavailable-13.C: New test.