]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove redundant return statement after static_assert(false)
authorJonathan Wakely <jwakely@redhat.com>
Tue, 6 Jan 2026 16:18:21 +0000 (16:18 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 7 Jan 2026 15:21:49 +0000 (15:21 +0000)
Jakub's fix for PR c++/91388 means that we don't need an unreachable
return statement after static_assert(false).

libstdc++-v3/ChangeLog:

* include/bits/atomic_wait.h (__wait_args::_M_setup_wait):
Remove unreachable return statement.

Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
libstdc++-v3/include/bits/atomic_wait.h

index 10f4f91346762c36dead6fbc1f75772159c13a93..b6240a95370ffce36daf1682b8a7238a172c442c 100644 (file)
@@ -226,10 +226,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
              else if constexpr (sizeof(_Tp) == sizeof(__UINT64_TYPE__))
                return __builtin_bit_cast(_Tp, (__UINT64_TYPE__)_M_old);
              else
-               {
-                 static_assert(false); // Unsupported size
-                 return {};
-               }
+               static_assert(false); // Unsupported size
            }
 
          if constexpr (!__platform_wait_uses_type<_Tp>)