https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120299
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For GCC:
# 1923 "/opt/compiler-explorer/gcc-trunk-20250515/include/c++/16.0.0/format" 3
using __flt128_t = _Float128;
# 1955 "/opt/compiler-explorer/gcc-trunk-20250515/include/c++/16.0.0/format" 3
Which comes from:
#elif defined _GLIBCXX_LDOUBLE_IS_IEEE_BINARY128
// Format 128-bit floating-point types using long double.
using __flt128_t = long double;
# define _GLIBCXX_FORMAT_F128 2
#elif __FLT128_DIG__ && defined(_GLIBCXX_HAVE_FLOAT128_MATH)
// Format 128-bit floating-point types using _Float128.
using __flt128_t = _Float128;
# define _GLIBCXX_FORMAT_F128 3
...
#if defined(__SIZEOF_FLOAT128__) && _GLIBCXX_FORMAT_F128 != 1
// Reuse __formatter_fp<C>::format<__format::__flt128_t, Out> for __float128.
// This formatter is not declared if _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT is
true,
// as __float128 when present is same type as __ieee128, which may be same as
// long double.
template<__format::__char _CharT>
struct formatter<__float128, _CharT>
{
formatter() = default;
[[__gnu__::__always_inline__]]
constexpr typename basic_format_parse_context<_CharT>::iterator
parse(basic_format_parse_context<_CharT>& __pc)
{ return _M_f.parse(__pc); }
template<typename _Out>
typename basic_format_context<_Out, _CharT>::iterator
format(__float128 __u, basic_format_context<_Out, _CharT>& __fc) const
{ return _M_f.format((__format::__flt128_t)__u, __fc); }
private:
__format::__formatter_fp<_CharT> _M_f;
static_assert( !is_same_v<__float128, long double>,
"This specialization should not be used for long double"
);
};
#endif
Looks like there is a disconnect of having _Float128 and __float128.