pr67960.C
348 Bytes
-
c++: Redundant -Wdeprecated-declarations warning in build_over_call [PR67960] · 80a13af7
In build_over_call, we are emitting a redundant -Wdeprecated-declarations warning about the deprecated callee function, first from mark_used and again from build_addr_func <- decay_conversion <- cp_build_addr_expr <- mark_used. It seems this second deprecation warning coming from build_addr_func will always be redundant, so we can safely use a warning_sentinel to disable it before calling build_addr_func. (And any deprecation warning that could come from build_addr_func would be for FN, so we wouldn't be suppressing too much.) gcc/cp/ChangeLog: PR c++/67960 * call.c (build_over_call): Use a warning_sentinel to disable warn_deprecated_decl before calling build_addr_func. gcc/testsuite/ChangeLog: PR c++/67960 * g++.dg/diagnostic/pr67960.C: New test. * g++.dg/diagnostic/pr67960-2.C: New test.
Patrick Palka committed