Please don't send a [PATCH 0/1] cover letter for a patch "series" of
one patch. Just put the explanation in the patch's commit message,
instead of saying the same thing in two places, with slightly
different wording.

Also, despite writing two cover letters and two commit messages, you
didn't explain why this is a desirable change. What's wrong with the
literal? And why should we change this now on the gcc-14 release
branch?


On Sat, 5 Sept 2026 at 22:02, Jakit Liang <[email protected]> wrote:
>
> In std::basic_format_arg::_S_to_arg_type, replace the bfloat16 normalization 
> check that uses decltype(0.0bf16) with __gnu_cxx::__bfloat16_t.
>
> This preserves existing behavior (normalizing to float) while avoiding a 
> direct bf16 literal-based type check in <format>.
>
> Signed-off-by: Jakit Liang <[email protected]>
> ---
>  libstdc++-v3/include/std/format | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format
> index ada62c26bca..52136c9fd76 100644
> --- a/libstdc++-v3/include/std/format
> +++ b/libstdc++-v3/include/std/format
> @@ -3373,7 +3373,7 @@ namespace __format
>  #endif
>
>  #if defined(__BFLT16_DIG__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32)
> -         else if constexpr (is_same_v<_Td, decltype(0.0bf16)>)
> +         else if constexpr (is_same_v<_Td, __gnu_cxx::__bfloat16_t>)
>             return type_identity<float>();
>  #endif
>
> --
> 2.47.3
>

Reply via email to