]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Implement P1494 and P3641 Partial program correctness [PR119060]
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 4 Sep 2025 15:21:16 +0000 (16:21 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 18 Oct 2025 22:18:02 +0000 (23:18 +0100)
commit1e84849cb2a1d777b38b45dab8c6e5ecd49b6b77
treeb51ff9037073d0fedfb4d8be628f1ca6847e0473
parent9056b5faa87df59fb8eb2f92096a8e6e7d246757
libstdc++: Implement P1494 and P3641 Partial program correctness [PR119060]

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 <iain@sandoe.co.uk>
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h
libstdc++-v3/include/std/utility
libstdc++-v3/src/c++23/std.cc.in