]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: use -Wno-deprecated-declarations
authorJason Merrill <jason@redhat.com>
Fri, 7 Nov 2025 13:16:30 +0000 (18:46 +0530)
committerJason Merrill <jason@redhat.com>
Wed, 12 Nov 2025 03:35:41 +0000 (09:05 +0530)
-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.

24 files changed:
libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
libstdc++-v3/testsuite/18_support/uncaught_exception/14026.cc
libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc
libstdc++-v3/testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/is_literal_type/requirements/typedefs.cc
libstdc++-v3/testsuite/20_util/is_literal_type/value.cc
libstdc++-v3/testsuite/20_util/is_pod/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/is_pod/requirements/typedefs.cc
libstdc++-v3/testsuite/20_util/is_pod/value.cc
libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc
libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc
libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc
libstdc++-v3/testsuite/20_util/shared_ptr/atomic/1.cc
libstdc++-v3/testsuite/20_util/shared_ptr/atomic/2.cc
libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc
libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc
libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc
libstdc++-v3/testsuite/20_util/unique_ptr/cons/auto_ptr.cc
libstdc++-v3/testsuite/20_util/unique_ptr/cons/auto_ptr_neg.cc
libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc
libstdc++-v3/testsuite/29_atomics/atomic/lwg3220.cc
libstdc++-v3/testsuite/experimental/type_traits/value.cc

index 0a4d092f99910855d3eebb46c41f89f0f9319f3c..a49f347b8983563005e265e4482ba5e4aaa736d9 100644 (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.
index 58f241b2aa07e7e42767c06773b6c39df46b882f..7f41c804ce59ea04d06bf647dbc13c0729c4232e 100644 (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>
index 3ee367971ebeea2bbad81dca65234a13ff140fd8..d58353e80b47149d62692a241ffd52890e280a9b 100644 (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>
 
index ca3676a6975a84ac937fafb12313325e9b058982..71d0f462c93350ce3ffe4216597ab5e983c850ae 100644 (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>
 
index 353d89f72e512f139294cc60eff00e65a7cf2a5c..7cfce9e1e5f230b5077731ace5721bb641c203b7 100644 (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>
index b65d301017a2feb088f303fbcea53312b3a68ad0..f8b1b8d6756b9f8b852668748101265c1cfa1bf0 100644 (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>
index 0bffe2145ab8991145c901d5be645c45364e2380..bcf67e1ecd3585a6c62c2dc24f6b2ccd3cf79153 100644 (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.
index 38c6e13a494329da59e4afee55740fa723bacf6e..6a41ea0a6645b344596e7a319176cf24ba2088c9 100644 (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>
 //
index ff53aed3a19851d8cd5e18f7dabbf5cb54d32498..3722309b79939bba532095360cd90eb2061c6b4c 100644 (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>
 //
index 96678d2126d8f17caef60428d895426f5330ae59..d4096cebf050b690179373f0555f1dced6e690ae 100644 (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 }
index d7dfcf1c375f3653c82b1191ecabe8cce6f95492..09f7ff4a5e714da3b02b796287ffcf7fcf2d37a4 100644 (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 }
index 8c98f7e66df811d1964f9c4dfd28387a9027ec88..c94fcdd92802624485d6831bbdf0d428135ec2af 100644 (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 }
index b3d2cdedb5b4000c06c50de67bdb85dcbe19c71e..2be9f30ceaa621170dcfc292428610813801f90c 100644 (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>
 
index 9c759221e367f6669e9affd0727ca5f5593b6bbf..95baedd25eec8514fd7b9c876abd4e14e5d69737 100644 (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>
 
index a722792047b00183001c8761a10461bba3dd1387..3cbe08b856f8428bd8c69c45a741e97dea787f42 100644 (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.
 //
index 544cc01ffa6d5241c0e3825a0af56f74a0730c80..12639fa2dab70085e9d0029b8dd00b1700b1a4e4 100644 (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 }
index 2e4f0ba686b4ca7851de3e79c340314c4bc77d96..847210b9c1091a1e68113a63aba82e76889cf8a5 100644 (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 }
index 11b62d4762c83c5bb4acc3562a45139d63c7b853..5779f8552ec72ddea96fcf158098a6e1e1d80060 100644 (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 }
index 162f92da261b9b82687a21bfcf287ae299c0226c..47433872500993fc0abc0aace7901f784c0daa2c 100644 (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 }
index c9ac7f9ee5cd48ef0fe5e15dad7494b39f422606..b49171d01b9a62aa4172bff71a4249a45d13951f 100644 (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 } }
 
index 7b9758f98b826b95b0554090224f2a780037d3c6..6440dd7b07bf995fdbe385ac0a0bddeda7870580 100644 (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 } }
 
index 253886bf6e19e787d4d5114318778950a963bc79..b48958746e1b7a7ef4e7ba912768aa74777c1269 100644 (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.
index 217db7cbfeafa46fca359fb25833d8ff5c4d5971..a8b785129552d318454294e3a7009be9ea72ab7c 100644 (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.
index 60207b580d7eb5f0588287ba92f5a5504e399db4..7ad72c6a2f22ddc58398954afa9d055fffa20c45 100644 (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.
 //