On Mon, Sep 07, 2026 at 09:59:04PM +0800, Jakit Liang wrote:
> Tested on x86_64-linux-gnu with g++ and clangd 18/19.
> 
> Signed-off-by: Jakit Liang <[email protected]>
> ---
>  libstdc++-v3/include/bits/c++config | 2 +-
>  libstdc++-v3/include/std/format     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libstdc++-v3/include/bits/c++config 
> b/libstdc++-v3/include/bits/c++config
> index 60456a48681..072da451df8 100644
> --- a/libstdc++-v3/include/bits/c++config
> +++ b/libstdc++-v3/include/bits/c++config
> @@ -892,7 +892,7 @@ namespace std
>  #if defined __cplusplus && defined __BFLT16_DIG__
>  namespace __gnu_cxx
>  {
> -  typedef __decltype(0.0bf16) __bfloat16_t;
> +  typedef __bf16 __bfloat16_t;

This is incorrect.

__bf16 is the type of 0.0bf16 literals only on some targets, not all.
You haven't explained why is __BFLT16_DIG__ defined when compiling with
clangd, it shouldn't be when it doesn't support bfloat16_t properly.
Are you defining it by hand on the command line or in some user header
or main source before including the libstdc++ headers?

        Jakub

Reply via email to