]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Tweak static_assert messages for volatile atomic waits
authorJonathan Wakely <jwakely@redhat.com>
Sat, 15 Nov 2025 10:55:55 +0000 (10:55 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 15 Nov 2025 21:45:44 +0000 (21:45 +0000)
libstdc++-v3/ChangeLog:

* include/bits/atomic_base.h: Tweak grammar of static assert
messages for unsupported atomic wait on volatile.

libstdc++-v3/include/bits/atomic_base.h

index ccea132bb679dcb67fe8076d7c73e7703a217720..90b8df55edeac0dc33bb434fc6d8d4e26d09d769 100644 (file)
@@ -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