libstdc++: use -Wno-deprecated-declarations

-Wno-deprecated doesn't work with header units, since the testcase can't
change the header unit's version of the __DEPRECATED macro.  But
-Wno-deprecated-declarations works just fine to avoid warning about
deprecated things.

libstdc++-v3/ChangeLog:

	* testsuite/18_support/exception_ptr/62258.cc: Use
	-Wno-deprecated-declarations instead of -Wno-deprecated.
	* testsuite/18_support/uncaught_exception/14026.cc
	* testsuite/20_util/headers/functional/synopsis.cc
	* testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc
	* testsuite/20_util/is_literal_type/requirements/typedefs.cc
	* testsuite/20_util/is_literal_type/value.cc
	* testsuite/20_util/is_pod/requirements/explicit_instantiation.cc
	* testsuite/20_util/is_pod/requirements/typedefs.cc
	* testsuite/20_util/is_pod/value.cc
	* testsuite/20_util/shared_ptr/assign/auto_ptr.cc
	* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc
	* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc
	* testsuite/20_util/shared_ptr/atomic/1.cc
	* testsuite/20_util/shared_ptr/atomic/2.cc
	* testsuite/20_util/shared_ptr/atomic/3.cc
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc
	* testsuite/20_util/shared_ptr/cons/auto_ptr.cc
	* testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc
	* testsuite/20_util/shared_ptr/creation/dr925.cc
	* testsuite/20_util/unique_ptr/cons/auto_ptr.cc
	* testsuite/20_util/unique_ptr/cons/auto_ptr_neg.cc
	* testsuite/20_util/variable_templates_for_traits.cc
	* testsuite/29_atomics/atomic/lwg3220.cc
	* testsuite/experimental/type_traits/value.cc: Likewise.
This commit is contained in:
Jason Merrill 2025-11-07 18:46:30 +05:30
parent bc68e43df5
commit 294cffd4d1
24 changed files with 24 additions and 24 deletions

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-do run { target c++11 } }
// Copyright (C) 2015-2025 Free Software Foundation, Inc.

View File

@ -18,7 +18,7 @@
// PR 14026
// 18.6.4 uncaught_exception
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
#include <cstdlib>
#include <exception>

View File

@ -18,7 +18,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
#include <functional>

View File

@ -1,4 +1,4 @@
// { dg-additional-options "-Wno-deprecated" { target c++17 } }
// { dg-additional-options "-Wno-deprecated-declarations" { target c++17 } }
// { dg-do compile { target c++11 } }
// 2010-02-21 Paolo Carlini <paolo.carlini@oracle.com>

View File

@ -1,4 +1,4 @@
// { dg-additional-options "-Wno-deprecated" { target c++17 } }
// { dg-additional-options "-Wno-deprecated-declarations" { target c++17 } }
// { dg-do compile { target c++11 } }
// 2010-02-21 Paolo Carlini <paolo.carlini@oracle.com>

View File

@ -1,4 +1,4 @@
// { dg-additional-options "-Wno-deprecated" { target c++17 } }
// { dg-additional-options "-Wno-deprecated-declarations" { target c++17 } }
// { dg-do compile { target c++11 } }
// 2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>

View File

@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
// { dg-additional-options "-Wno-deprecated" { target { c++2a } } }
// { dg-additional-options "-Wno-deprecated-declarations" { target { c++2a } } }
// 2010-02-21 Paolo Carlini <paolo.carlini@oracle.com>
// Copyright (C) 2010-2025 Free Software Foundation, Inc.

View File

@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
// { dg-additional-options "-Wno-deprecated" { target { c++2a } } }
// { dg-additional-options "-Wno-deprecated-declarations" { target { c++2a } } }
// 2010-02-21 Paolo Carlini <paolo.carlini@oracle.com>
//

View File

@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
// { dg-additional-options "-Wno-deprecated" { target { c++2a } } }
// { dg-additional-options "-Wno-deprecated-declarations" { target { c++2a } } }
// 2010-02-21 Paolo Carlini <pcarlini@suse.de>
//

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do run { target c++11 } }
// { dg-require-effective-target hosted }

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do compile { target c++11 } }
// { dg-require-effective-target hosted }

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated -Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do compile { target c++11 } }
// { dg-require-effective-target hosted }

View File

@ -18,7 +18,7 @@
// { dg-do run { target c++11 } }
// { dg-require-gthreads "" }
// { dg-require-effective-target hosted }
// { dg-additional-options "-Wno-deprecated" { target c++20 } }
// { dg-additional-options "-Wno-deprecated-declarations" { target c++20 } }
#include <memory>

View File

@ -18,7 +18,7 @@
// { dg-do run { target c++11 } }
// { dg-require-gthreads "" }
// { dg-require-effective-target hosted }
// { dg-additional-options "-Wno-deprecated" { target c++20 } }
// { dg-additional-options "-Wno-deprecated-declarations" { target c++20 } }
#include <memory>

View File

@ -1,7 +1,7 @@
// { dg-do run { target c++11 } }
// { dg-additional-options "-pthread" { target pthread } }
// { dg-require-gthreads "" }
// { dg-additional-options "-Wno-deprecated" { target c++20 } }
// { dg-additional-options "-Wno-deprecated-declarations" { target c++20 } }
// Copyright (C) 2014-2025 Free Software Foundation, Inc.
//

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do compile { target c++11 } }
// { dg-require-effective-target hosted }

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do run { target c++11 } }
// { dg-require-effective-target hosted }

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do compile { target c++11 } }
// { dg-require-effective-target hosted }

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do run { target c++11 } }
// { dg-require-effective-target hosted }

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do run { target c++11 } }

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-add-options using-deprecated }
// { dg-do compile { target c++11 } }

View File

@ -1,4 +1,4 @@
// { dg-additional-options "-Wno-deprecated" { target c++2a } }
// { dg-additional-options "-Wno-deprecated-declarations" { target c++2a } }
// { dg-do compile { target c++17 } }
// Copyright (C) 2014-2025 Free Software Foundation, Inc.

View File

@ -1,4 +1,4 @@
// { dg-options "-Wno-deprecated" }
// { dg-options "-Wno-deprecated-declarations" }
// { dg-do compile { target c++11 } }
// std::shared_ptr is not freestanding.

View File

@ -1,5 +1,5 @@
// { dg-do compile { target c++14 } }
// { dg-additional-options "-Wno-deprecated" { target { c++2a } } }
// { dg-additional-options "-Wno-deprecated-declarations" { target { c++2a } } }
// Copyright (C) 2014-2025 Free Software Foundation, Inc.
//