[gcc r14-11365] libstdc++: Fix outdated comment in <stacktrace>

Jonathan Wakely redi@gcc.gnu.org
Fri Feb 28 21:48:04 GMT 2025


https://gcc.gnu.org/g:2b9449c2c1b60ddc191d51617d892fa461b5cfcb

commit r14-11365-g2b9449c2c1b60ddc191d51617d892fa461b5cfcb
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Feb 27 21:58:09 2025 +0000

    libstdc++: Fix outdated comment in <stacktrace>
    
    My r15-998-g2a83084ce55363 change replaced the use of nothrow
    operator new with a call to __get_temporary_buffer, so update the
    comment to match.
    
    libstdc++-v3/ChangeLog:
    
            * include/std/stacktrace (_Impl::_M_allocate): Fix outdated
            comment.
    
    (cherry picked from commit e8302282cdb53ae1d347c12d7a50c4209fbab4f7)

Diff:
---
 libstdc++-v3/include/std/stacktrace | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/std/stacktrace b/libstdc++-v3/include/std/stacktrace
index c7558069d5d1..fc1b3af9e4f6 100644
--- a/libstdc++-v3/include/std/stacktrace
+++ b/libstdc++-v3/include/std/stacktrace
@@ -555,7 +555,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	    {
 	      if constexpr (is_same_v<allocator_type, allocator<value_type>>)
 		{
-		  // For std::allocator we use nothrow-new directly so we
+		  // Use non-throwing __get_temporary_buffer, so that we
 		  // don't need to handle exceptions from __alloc.allocate(n).
 		  auto __p = __detail::__get_temporary_buffer<value_type>(__n);
 		  if (__p == nullptr) [[unlikely]]


More information about the Libstdc++-cvs mailing list