From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed] libstdc++: Add suggestion to std::uncaught_exception() warning
Date: Fri, 4 Feb 2022 15:27:34 +0000 [thread overview]
Message-ID: <20220204152734.2632193-1-jwakely@redhat.com> (raw)
Tested powerpc64le-linux, pushed to trunk.
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.
---
libstdc++-v3/include/bits/allocator.h | 4 ++--
libstdc++-v3/libsupc++/exception | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h
index e0c322b5941..f7770165273 100644
--- a/libstdc++-v3/include/bits/allocator.h
+++ b/libstdc++-v3/include/bits/allocator.h
@@ -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
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception
index a7d6b4b93ee..43f1cf71262 100644
--- a/libstdc++-v3/libsupc++/exception
+++ b/libstdc++-v3/libsupc++/exception
@@ -120,7 +120,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
--
2.34.1
reply other threads:[~2022-02-04 15:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220204152734.2632193-1-jwakely@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).