<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libstdc++-v3/src, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>libstdc++: Fix error reporting for filesystem::rename on Windows [PR122726]</title>
<updated>2025-11-17T21:18:24+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-11-17T21:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=77278e0292cd23f0d1ddbb5e6e18064e119bdd6f'/>
<id>77278e0292cd23f0d1ddbb5e6e18064e119bdd6f</id>
<content type='text'>
Use the __last_system_error() function and the system_category to
convert the Windows error to a generic one.

libstdc++-v3/ChangeLog:

	PR libstdc++/122726
	* src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
	(rename): Use __last_system_error to set errno accurately.
	* testsuite/27_io/filesystem/operations/rename.cc: Test
	error_code matches errc::no_such_file_or_directory.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the __last_system_error() function and the system_category to
convert the Windows error to a generic one.

libstdc++-v3/ChangeLog:

	PR libstdc++/122726
	* src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
	(rename): Use __last_system_error to set errno accurately.
	* testsuite/27_io/filesystem/operations/rename.cc: Test
	error_code matches errc::no_such_file_or_directory.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Fix std module for gcc4-compatible ABI</title>
<updated>2025-11-17T17:57:17+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-11-17T14:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=edde0ae2b5299aeef5555346788d9059de45d813'/>
<id>edde0ae2b5299aeef5555346788d9059de45d813</id>
<content type='text'>
Add preprocessor checks to std.cc.in for features which are not
supported with the old string ABI.

The COW std::string doesn't properly support C++11 allocators, so the
aliases such as std::pmr::string, std::pmr::u8string etc. are not
defined for the old string ABI.

The std::syncbuf type uses std::string and is not defined for the old
string ABI.

libstdc++-v3/ChangeLog:

	* src/c++23/std.cc.in [!__cpp_lib_syncbuf]: Disable exports for
	&lt;syncstream&gt; contents when not defined.
	[!_GLIBCXX_USE_CXX11_ABI]: Disable exports for pmr aliases in
	&lt;string&gt; when not defined.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add preprocessor checks to std.cc.in for features which are not
supported with the old string ABI.

The COW std::string doesn't properly support C++11 allocators, so the
aliases such as std::pmr::string, std::pmr::u8string etc. are not
defined for the old string ABI.

The std::syncbuf type uses std::string and is not defined for the old
string ABI.

libstdc++-v3/ChangeLog:

	* src/c++23/std.cc.in [!__cpp_lib_syncbuf]: Disable exports for
	&lt;syncstream&gt; contents when not defined.
	[!_GLIBCXX_USE_CXX11_ABI]: Disable exports for pmr aliases in
	&lt;string&gt; when not defined.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Include &lt;mutex&gt; in syncbuf.cc [PR122698]</title>
<updated>2025-11-16T14:00:55+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-11-16T13:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=84dbb22f32a525a0f0e0b7c02c56eec2fa6f39da'/>
<id>84dbb22f32a525a0f0e0b7c02c56eec2fa6f39da</id>
<content type='text'>
For most configurations bits/std_mutex.h would already be included by
&lt;syncstream&gt;, but not if configured with _GLIBCXX_USE_CXX11_ABI=0 as the
default, because syncbuf is disabled in that case.

libstdc++-v3/ChangeLog:

	PR libstdc++/122698
	* src/c++20/syncbuf.cc (__syncbuf_get_mutex): Include &lt;mutex&gt;.
	Fix indentation of function body.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For most configurations bits/std_mutex.h would already be included by
&lt;syncstream&gt;, but not if configured with _GLIBCXX_USE_CXX11_ABI=0 as the
default, because syncbuf is disabled in that case.

libstdc++-v3/ChangeLog:

	PR libstdc++/122698
	* src/c++20/syncbuf.cc (__syncbuf_get_mutex): Include &lt;mutex&gt;.
	Fix indentation of function body.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Minor refactoring in __wait_until_impl in atomic.cc</title>
<updated>2025-11-15T21:45:44+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-11-14T15:51:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=bbbd6a97f3b48af92210a60d58d0a6a3f3952c80'/>
<id>bbbd6a97f3b48af92210a60d58d0a6a3f3952c80</id>
<content type='text'>
libstdc++-v3/ChangeLog:

	* src/c++20/atomic.cc (__wait_impl): Fix outdated comment.
	(__wait_until_impl): Simplify return statements.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libstdc++-v3/ChangeLog:

	* src/c++20/atomic.cc (__wait_impl): Fix outdated comment.
	(__wait_until_impl): Simplify return statements.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: adjust std module TBB workaround</title>
<updated>2025-11-03T15:55:06+00:00</updated>
<author>
<name>Jason Merrill</name>
<email>jason@redhat.com</email>
</author>
<published>2025-11-03T15:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=237a83da197adf6d0a70d715812182df77fa5bf7'/>
<id>237a83da197adf6d0a70d715812182df77fa5bf7</id>
<content type='text'>
Messing with macros before possibly importing the stdc++.h header unit is
bad form; better to mess with (other) macros afterward.

libstdc++-v3/ChangeLog:

	* src/c++23/std.cc.in: Move TBB macro shenanigans after
	bits/stdc++.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Messing with macros before possibly importing the stdc++.h header unit is
bad form; better to mess with (other) macros afterward.

libstdc++-v3/ChangeLog:

	* src/c++23/std.cc.in: Move TBB macro shenanigans after
	bits/stdc++.h.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: add missing exports</title>
<updated>2025-11-02T19:20:49+00:00</updated>
<author>
<name>Jason Merrill</name>
<email>jason@redhat.com</email>
</author>
<published>2025-11-01T13:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=a06228ca4dddac44bba28c8e9ebd2f7000167c2e'/>
<id>a06228ca4dddac44bba28c8e9ebd2f7000167c2e</id>
<content type='text'>
These exports didn't get uncommented when the functionality was implemented.

libstdc++-v3/ChangeLog:

	* src/c++23/std.cc.in: Uncomment usings for vprint_*_buffered.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These exports didn't get uncommented when the functionality was implemented.

libstdc++-v3/ChangeLog:

	* src/c++23/std.cc.in: Uncomment usings for vprint_*_buffered.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstd++: Implement C++23 P2674R1 - A trait for implicit lifetime types</title>
<updated>2025-10-30T07:46:26+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@redhat.com</email>
</author>
<published>2025-10-30T07:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=acdf675933d549f2fe2c89e4feabcf36e382b4f5'/>
<id>acdf675933d549f2fe2c89e4feabcf36e382b4f5</id>
<content type='text'>
The following patch attempts to implement the library side of the
C++23 P2674R1 paper.  As mentioned in the paper, since CWG2605
the trait isn't really implementable purely on the library side.

The compiler side has been committed earlier, so this just uses
the new builtin trait on the library side.

2025-10-30  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* include/bits/version.def (is_implicit_lifetime): New.
	* include/bits/version.h: Regenerate.
	* include/std/type_traits (std::is_implicit_lifetime,
	std::is_implicit_lifetime_v): New trait.
	* src/c++23/std.cc.in (std::is_implicit_lifetime,
	std::is_implicit_lifetime_v): Export.
	* testsuite/20_util/is_implicit_lifetime/version.cc: New test.
	* testsuite/20_util/is_implicit_lifetime/value.cc: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following patch attempts to implement the library side of the
C++23 P2674R1 paper.  As mentioned in the paper, since CWG2605
the trait isn't really implementable purely on the library side.

The compiler side has been committed earlier, so this just uses
the new builtin trait on the library side.

2025-10-30  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* include/bits/version.def (is_implicit_lifetime): New.
	* include/bits/version.h: Regenerate.
	* include/std/type_traits (std::is_implicit_lifetime,
	std::is_implicit_lifetime_v): New trait.
	* src/c++23/std.cc.in (std::is_implicit_lifetime,
	std::is_implicit_lifetime_v): Export.
	* testsuite/20_util/is_implicit_lifetime/version.cc: New test.
	* testsuite/20_util/is_implicit_lifetime/value.cc: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Fix &lt;mdspan&gt; export in std module</title>
<updated>2025-10-24T18:06:14+00:00</updated>
<author>
<name>Eric Pimentel Aguiar</name>
<email>eric.pimentela@gmail.com</email>
</author>
<published>2025-10-24T13:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=b1c2006077085a12b26c93cbc745508ba096be0a'/>
<id>b1c2006077085a12b26c93cbc745508ba096be0a</id>
<content type='text'>
When exporting declarations in a namespace with using declarations, the
name must be fully qualified. Recently introduced std::full_extent{,_t},
std:strided_slice, and std::submdspan_mapping_result broke module std
and module std.compat.

libstdc++-v3/ChangeLog:

	* src/c++23/std.cc.in (std::strided_slice, std::full_extent_t)
	(std::full_extent, std::submdspan_mapping_result): Add std
	qualification.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When exporting declarations in a namespace with using declarations, the
name must be fully qualified. Recently introduced std::full_extent{,_t},
std:strided_slice, and std::submdspan_mapping_result broke module std
and module std.compat.

libstdc++-v3/ChangeLog:

	* src/c++23/std.cc.in (std::strided_slice, std::full_extent_t)
	(std::full_extent, std::submdspan_mapping_result): Add std
	qualification.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Implement P1494 and P3641 Partial program correctness [PR119060]</title>
<updated>2025-10-18T22:18:02+00:00</updated>
<author>
<name>Iain Sandoe</name>
<email>iain@sandoe.co.uk</email>
</author>
<published>2025-09-04T15:21:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=1e84849cb2a1d777b38b45dab8c6e5ecd49b6b77'/>
<id>1e84849cb2a1d777b38b45dab8c6e5ecd49b6b77</id>
<content type='text'>
This implements the library parts of P1494 as amended by P3641.  For GCC the
compiler itself treats stdio operations as equivalent to the observable
checkpoint and thus it does not appear to be necessary to add calls to those
functions (it will not alter the outcome).

This adds the facility for C++26, although there is no reason, in principle,
that it would not work back to C++11 at least.

	PR c++/119060

libstdc++-v3/ChangeLog:

	* include/bits/version.def: Add observable_checkpoint at present
	allowed from C++26.
	* include/bits/version.h: Regenerate.
	* include/std/utility: Add std::observable_checkpoint().
	* src/c++23/std.cc.in: Add obervable_checkpoint () to utility.

Signed-off-by: Iain Sandoe &lt;iain@sandoe.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements the library parts of P1494 as amended by P3641.  For GCC the
compiler itself treats stdio operations as equivalent to the observable
checkpoint and thus it does not appear to be necessary to add calls to those
functions (it will not alter the outcome).

This adds the facility for C++26, although there is no reason, in principle,
that it would not work back to C++11 at least.

	PR c++/119060

libstdc++-v3/ChangeLog:

	* include/bits/version.def: Add observable_checkpoint at present
	allowed from C++26.
	* include/bits/version.h: Regenerate.
	* include/std/utility: Add std::observable_checkpoint().
	* src/c++23/std.cc.in: Add obervable_checkpoint () to utility.

Signed-off-by: Iain Sandoe &lt;iain@sandoe.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Avoid overflow in timeout conversions [PR113327]</title>
<updated>2025-10-14T16:26:42+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-10-09T10:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=5dba17a3e709859968f939354e6e5e8d796012d3'/>
<id>5dba17a3e709859968f939354e6e5e8d796012d3</id>
<content type='text'>
When converting from a coarse duration with a very large value, the
existing code scales that up to chrono::seconds which overflows the
chrono::seconds::rep type. For example, sleep_for(chrono::hours::max())
tries to calculate LLONG_MAX * 3600, which overflows to -3600 and so the
sleep returns immediately.

The solution in this commit is inspired by this_thread::sleep_for in
libc++ which compares the duration argument to
chrono::duration&lt;long double&gt;(nanoseconds::max()) and limits the
duration to nanoseconds::max(). Because we split the duration into
seconds and nanoseconds, we can use seconds::max() as our upper limit.

We might need to limit further if seconds::max() doesn't fit in the
type used for sleeping, which is one of std::time_t, unsigned int, or
chrono::milliseconds.

To fix this everywhere that uses timeouts, new functions are introduced
for converting from a chrono::duration or chrono::time_point to a
timespec (or __gthread_time_t which is just a timespec on Linux). These
functions provide one central place where we can avoid overflow and also
handle negative timeouts (as these produce errors when passed to OS
functions that do not accept absolute times before the epoch). All
negative durations are converted to zero, and negative time_points are
converted to the epoch.

The new __to_timeout_gthread_time_t function in &lt;bits/std_mutex.h&gt;
requires adding &lt;bits/chrono.h&gt; to that header, but that only affects
&lt;syncstream&gt;. All other consumers of &lt;bits/std_mutex.h&gt; were already
including &lt;bits/chrono.h&gt; for timeouts (e.g. &lt;shared_mutex&gt; and
&lt;condition_variable&gt;).

libstdc++-v3/ChangeLog:

	PR libstdc++/113327
	PR libstdc++/116586
	PR libstdc++/119258
	PR libstdc++/58931
	* include/bits/chrono.h (__to_timeout_timespec): New overloaded
	function templates for converting chrono types to timespec.
	* include/bits/std_mutex.h (__to_timeout_gthread_time_t): New
	function template for converting time_point to __gthread_time_t.
	* include/bits/this_thread_sleep.h (sleep_for): Use
	__to_timeout_timespec.
	(__sleep_for): Remove namespace-scope declaration.
	* include/std/condition_variable: Likewise.
	* include/std/mutex: Likewise.
	* include/std/shared_mutex: Likewise.
	* src/c++11/thread.cc (limit): New helper function.
	(__sleep_for): Use limit to prevent overflow when converting
	chrono::seconds to time_t, unsigned, or chrono::milliseconds.
	* src/c++20/atomic.cc: Use __to_timeout_timespec and
	__to_timeout_gthread_time_t for timeouts.
	* testsuite/30_threads/this_thread/113327.cc: New test.

Reviewed-by: Mike Crowe &lt;mac@mcrowe.com&gt;
Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When converting from a coarse duration with a very large value, the
existing code scales that up to chrono::seconds which overflows the
chrono::seconds::rep type. For example, sleep_for(chrono::hours::max())
tries to calculate LLONG_MAX * 3600, which overflows to -3600 and so the
sleep returns immediately.

The solution in this commit is inspired by this_thread::sleep_for in
libc++ which compares the duration argument to
chrono::duration&lt;long double&gt;(nanoseconds::max()) and limits the
duration to nanoseconds::max(). Because we split the duration into
seconds and nanoseconds, we can use seconds::max() as our upper limit.

We might need to limit further if seconds::max() doesn't fit in the
type used for sleeping, which is one of std::time_t, unsigned int, or
chrono::milliseconds.

To fix this everywhere that uses timeouts, new functions are introduced
for converting from a chrono::duration or chrono::time_point to a
timespec (or __gthread_time_t which is just a timespec on Linux). These
functions provide one central place where we can avoid overflow and also
handle negative timeouts (as these produce errors when passed to OS
functions that do not accept absolute times before the epoch). All
negative durations are converted to zero, and negative time_points are
converted to the epoch.

The new __to_timeout_gthread_time_t function in &lt;bits/std_mutex.h&gt;
requires adding &lt;bits/chrono.h&gt; to that header, but that only affects
&lt;syncstream&gt;. All other consumers of &lt;bits/std_mutex.h&gt; were already
including &lt;bits/chrono.h&gt; for timeouts (e.g. &lt;shared_mutex&gt; and
&lt;condition_variable&gt;).

libstdc++-v3/ChangeLog:

	PR libstdc++/113327
	PR libstdc++/116586
	PR libstdc++/119258
	PR libstdc++/58931
	* include/bits/chrono.h (__to_timeout_timespec): New overloaded
	function templates for converting chrono types to timespec.
	* include/bits/std_mutex.h (__to_timeout_gthread_time_t): New
	function template for converting time_point to __gthread_time_t.
	* include/bits/this_thread_sleep.h (sleep_for): Use
	__to_timeout_timespec.
	(__sleep_for): Remove namespace-scope declaration.
	* include/std/condition_variable: Likewise.
	* include/std/mutex: Likewise.
	* include/std/shared_mutex: Likewise.
	* src/c++11/thread.cc (limit): New helper function.
	(__sleep_for): Use limit to prevent overflow when converting
	chrono::seconds to time_t, unsigned, or chrono::milliseconds.
	* src/c++20/atomic.cc: Use __to_timeout_timespec and
	__to_timeout_gthread_time_t for timeouts.
	* testsuite/30_threads/this_thread/113327.cc: New test.

Reviewed-by: Mike Crowe &lt;mac@mcrowe.com&gt;
Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
