]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add suggestion to std::uncaught_exception() warning
authorJonathan Wakely <jwakely@redhat.com>
Thu, 3 Feb 2022 13:17:05 +0000 (13:17 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 4 Apr 2022 11:45:29 +0000 (12:45 +0100)
We should use the SUGGEST macro for std::uncaught_exception()
deprecation warnings.

libstdc++-v3/ChangeLog:

* include/bits/allocator.h: Qualify std::allocator_traits in
deprecated warnings.
* libsupc++/exception (uncaught_exception): Add suggestion to
deprecated warning.

(cherry picked from commit 27ba40559ccb887458009a34f710d4a22af85156)

libstdc++-v3/include/bits/allocator.h
libstdc++-v3/libsupc++/exception

index a6883c6758a4ba9d5df557c5e833f7b21d3aa223..e0c0a4b56bf1a0fcc0af9380ca99c9c2ed4bda08 100644 (file)
@@ -92,7 +92,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       using propagate_on_container_move_assignment = true_type;
 
       using is_always_equal
-       _GLIBCXX20_DEPRECATED_SUGGEST("allocator_traits::is_always_equal")
+       _GLIBCXX20_DEPRECATED_SUGGEST("std::allocator_traits::is_always_equal")
        = true_type;
 
 #if __cplusplus >= 202002L
@@ -146,7 +146,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       using propagate_on_container_move_assignment = true_type;
 
       using is_always_equal
-       _GLIBCXX20_DEPRECATED_SUGGEST("allocator_traits::is_always_equal")
+       _GLIBCXX20_DEPRECATED_SUGGEST("std::allocator_traits::is_always_equal")
        = true_type;
 #endif
 
index a023e22ea89f39b82afa8cf0a2552d6a878d0805..61ed3373360502fd97b9abae9684e6cd299edc6c 100644 (file)
@@ -105,7 +105,7 @@ namespace std
    *  %exception can result in a call of 1terminate()`
    *  (15.5.1).'
    */
-  _GLIBCXX17_DEPRECATED
+  _GLIBCXX17_DEPRECATED_SUGGEST("std::uncaught_exceptions()")
   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
 
 #if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++98