]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Suppress warnings about use of deprecated std::aligned_storage
authorJonathan Wakely <jwakely@redhat.com>
Thu, 23 Feb 2023 17:37:59 +0000 (17:37 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 24 Feb 2023 14:23:35 +0000 (14:23 +0000)
libstdc++-v3/ChangeLog:

* include/ext/aligned_buffer.h (__aligned_buffer): Add
diagnostic pragmas.

libstdc++-v3/include/ext/aligned_buffer.h

index 765d14684f2ca54f1a82db3eb070c19174402d87..dc62dfc8741fd84137b20ce0526f55ce7cb03ac0 100644 (file)
@@ -81,6 +81,8 @@ namespace __gnu_cxx
   template<typename _Tp>
     using __aligned_buffer = __aligned_membuf<_Tp>;
 #else
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
   // Similar to __aligned_membuf but aligned for complete objects, not members.
   // This type is used in <forward_list>, <future>, <bits/shared_ptr_base.h>
   // and <bits/hashtable_policy.h>, but ideally they would use __aligned_membuf
@@ -118,6 +120,7 @@ namespace __gnu_cxx
       _M_ptr() const noexcept
       { return static_cast<const _Tp*>(_M_addr()); }
     };
+#pragma GCC diagnostic pop
 #endif
 
 } // namespace