https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109177
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Alex Coplan <acop...@gcc.gnu.org>: https://gcc.gnu.org/g:d3a6f174543816600b1f472997d492088e4e396a commit r13-6801-gd3a6f174543816600b1f472997d492088e4e396a Author: Alex Coplan <alex.cop...@arm.com> Date: Wed Mar 22 15:20:49 2023 +0000 c++: Avoid duplicate diagnostic calling unavailable function [PR109177] As the PR shows, we currently emit duplicate diagnostics for calls to functions marked with __attribute__((unavailable)). This patch fixes that. gcc/cp/ChangeLog: PR c++/109177 * call.cc (build_over_call): Use make_temp_override to suppress both unavailable and deprecated warnings when calling build_addr_func. gcc/testsuite/ChangeLog: PR c++/109177 * g++.dg/ext/pr109177.C: New test.