[gcc r17-3430] libstdc++: Review fixes for r17-3429-g4cb7258da9bd63.

Tomasz Kaminski tkaminsk@gcc.gnu.org
Wed Aug 19 14:50:39 GMT 2026


https://gcc.gnu.org/g:74b3180bb616fbc35d1b655da75d8f6d8b39d368

commit r17-3430-g74b3180bb616fbc35d1b655da75d8f6d8b39d368
Author: Tomasz Kamiński <tkaminsk@redhat.com>
Date:   Wed Aug 19 16:48:04 2026 +0200

    libstdc++: Review fixes for r17-3429-g4cb7258da9bd63.
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/print.h (_File_sink::_File::_M_init_write_buf):
            Fix whitespace and pass errno directly to __throw_system_error.

Diff:
---
 libstdc++-v3/include/bits/print.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/libstdc++-v3/include/bits/print.h b/libstdc++-v3/include/bits/print.h
index d63267c8ecf7..722d82146ac8 100644
--- a/libstdc++-v3/include/bits/print.h
+++ b/libstdc++-v3/include/bits/print.h
@@ -86,19 +86,16 @@ namespace __format
 
       _File(_File&&) = delete;
 
-      // Allocate FILE's output buffer if needed, and returns span
+      // Allocate FILE's output buffer if needed, and return a span
       // viewing unused portion of it.
       std::span<char>
       _M_init_write_buf()
       {
-        // After setvbuf glibc pre-allocates the buffer but _IO_write_ptr
+	// After setvbuf glibc pre-allocates the buffer but _IO_write_ptr
 	// remains null until the first write.
 	if (!_M_file->_IO_write_ptr || _M_write_buf().empty())
 	  if (::__overflow(_M_file, EOF) == EOF)
-	    {
-	      const int __err = errno;
-	      __throw_system_error(__err);
-	    }
+	    __throw_system_error(errno);
 	return _M_write_buf();
       }


More information about the Libstdc++-cvs mailing list