+2020-03-13 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/67960
+ * call.c (build_over_call): Use a warning_sentinel to disable
+ warn_deprecated_decl before calling build_addr_func.
+
2020-03-12 Jakub Jelinek <jakub@redhat.com>
PR c++/94124
}
else
{
+ /* If FN is marked deprecated, then we've already issued a deprecated-use
+ warning from mark_used above, so avoid redundantly issuing another one
+ from build_addr_func. */
+ warning_sentinel w (warn_deprecated_decl);
+
fn = build_addr_func (fn, complain);
if (fn == error_mark_node)
return error_mark_node;
+2020-03-13 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/67960
+ * g++.dg/diagnostic/pr67960.C: New test.
+ * g++.dg/diagnostic/pr67960-2.C: New test.
+
2020-03-13 Martin Liska <mliska@suse.cz>
PR lto/94157
--- /dev/null
+// PR c++/67960
+// { dg-do compile }
+// { dg-additional-options "-Werror -fmax-errors=1" }
+__attribute__((deprecated)) void doNothing(){}
+
+int
+main()
+{
+ doNothing(); // { dg-error "is deprecated" }
+}
+
+// { dg-message "all warnings being treated as errors" "" { target *-*-* } 0 }
+// { dg-bogus "compilation terminated" "" { target *-*-* } 0 }
--- /dev/null
+// PR c++/67960
+// { dg-do compile { target c++14 } }
+// { dg-additional-options "-Werror -fmax-errors=1" }
+[[deprecated]] void doNothing(){}
+
+int
+main()
+{
+ doNothing(); // { dg-error "is deprecated" }
+}
+
+// { dg-message "all warnings being treated as errors" "" { target *-*-* } 0 }
+// { dg-bogus "compilation terminated" "" { target *-*-* } 0 }