[gcc r16-5308] libstdc++: Tweak static_assert messages for volatile atomic waits

Jonathan Wakely redi@gcc.gnu.org
Sat Nov 15 23:56:59 GMT 2025


https://gcc.gnu.org/g:85066ad6c301390fbab2805307a6cc61aef22c21

commit r16-5308-g85066ad6c301390fbab2805307a6cc61aef22c21
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sat Nov 15 10:55:55 2025 +0000

    libstdc++: Tweak static_assert messages for volatile atomic waits
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/atomic_base.h: Tweak grammar of static assert
            messages for unsupported atomic wait on volatile.

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

diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
index ccea132bb679..90b8df55edea 100644
--- a/libstdc++-v3/include/bits/atomic_base.h
+++ b/libstdc++-v3/include/bits/atomic_base.h
@@ -1584,7 +1584,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       wait(value_type __old, memory_order __m = memory_order_seq_cst) const noexcept
       {
 	// TODO remove when volatile is supported
-	static_assert(!is_volatile_v<_Tp>, "atomics waits on volatile are not supported");
+	static_assert(!is_volatile_v<_Tp>,
+		      "atomic waits on volatile are not supported");
 	__atomic_impl::wait(_M_ptr, __old, __m);
       }
 #endif // __glibcxx_atomic_wait
@@ -1666,7 +1667,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       notify_one() const noexcept
       {
 	// TODO remove when volatile is supported
-	static_assert(!is_volatile_v<_Tp>, "atomics waits on volatile are not supported");
+	static_assert(!is_volatile_v<_Tp>,
+		      "atomic waits on volatile are not supported");
 	__atomic_impl::notify_one(this->_M_ptr);
       }
 
@@ -1674,7 +1676,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       notify_all() const noexcept
       {
 	// TODO remove when volatile is supported
-	static_assert(!is_volatile_v<_Tp>, "atomics waits on volatile are not supported");
+	static_assert(!is_volatile_v<_Tp>,
+		      "atomic waits on volatile are not supported");
 	__atomic_impl::notify_all(this->_M_ptr);
       }
 #endif // __glibcxx_atomic_wait


More information about the Libstdc++-cvs mailing list