On Wed, Jan 7, 2026 at 12:56 PM Jonathan Wakely <[email protected]> wrote:

> 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.
>
>From the quick check, clang does not seem to emit this warning.
LGTM.

>
>  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
>
>

Reply via email to