[PATCH] libstdc++: Remove redundant return statement after static_assert(false)
Jonathan Wakely
jwakely@redhat.com
Wed Jan 7 11:51:36 GMT 2026
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.
---
Tested x86_64-linux.
libstdc++-v3/include/bits/atomic_wait.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libstdc++-v3/include/bits/atomic_wait.h b/libstdc++-v3/include/bits/atomic_wait.h
index 10f4f9134676..b6240a95370f 100644
--- a/libstdc++-v3/include/bits/atomic_wait.h
+++ b/libstdc++-v3/include/bits/atomic_wait.h
@@ -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>)
--
2.52.0
More information about the Libstdc++
mailing list