]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: fix build failures after acfdad706d8
authorNathan Myers <ncm@cantrip.org>
Tue, 19 May 2026 23:51:21 +0000 (19:51 -0400)
committerNathan Myers <ncm@cantrip.org>
Wed, 20 May 2026 06:59:38 +0000 (02:59 -0400)
Patch build failures from 2026-05-19 09:33:58

libstdc++-v3/Changelog:
* config/abi/pre/gnu.ver: Remove recent symbol swept up in
GLIBCXX_3.4.21.
* include/bits/basic_string.tcc (reserve): Guard __limit decl
under #if __cpp_exceptions to quiet warning.

libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/include/bits/basic_string.tcc

index bf4d7338cb6c75ce6d82f00c69bd28255ad5c865..3a6afac830873ac1bcb69435833acfdd9678032e 100644 (file)
@@ -1775,7 +1775,7 @@ GLIBCXX_3.4.21 {
     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE12_M_constructI[NP]*;
     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE13*;
     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE14_M_replace_aux*;
-    _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE1[68-9]*;
+    _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE1[68]*;
     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE2at*;
     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE3end*;
     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE4back*;
index 5f83991db83f04590d7bd0815f3e0d9e116e3d74..64c99fbb9d64100b624f6428ea9cd0e505f7ef6d 100644 (file)
@@ -433,11 +433,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       if (_M_is_local())
        return;
 
-#ifdef __glibcxx_allocate_at_least  // C++23
-      const size_type __limit = (__STDCPP_DEFAULT_NEW_ALIGNMENT__ - 1) / sizeof(_CharT);
-#else
-      const size_type __limit = 0;
-#endif
       const size_type __length = length();
       const size_type __capacity = _M_allocated_capacity;
 
@@ -447,9 +442,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          this->_S_copy(_M_local_buf, _M_data(), __length + 1);
          _M_destroy(__capacity);
          _M_data(_M_local_data());
+         return;
        }
 #if __cpp_exceptions
-      else if (__capacity - __length > __limit )
+#ifdef __glibcxx_allocate_at_least  // C++23
+      const size_type __limit =
+       (__STDCPP_DEFAULT_NEW_ALIGNMENT__ - 1) / sizeof(_CharT);
+#else
+      const size_type __limit = 0;
+#endif
+      if (__capacity - __length > __limit )
        try
          {
            _Alloc_result __r = _S_allocate_at_least(