]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Format __float128 as _Float128 only when long double is not 128 IEEE ...
authorTomasz Kamiński <tkaminsk@redhat.com>
Fri, 16 May 2025 05:12:36 +0000 (07:12 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Mon, 7 Jul 2025 11:32:21 +0000 (13:32 +0200)
commit2a82d4c859bd0eca4fe31fc79d234abd05e6a9d8
treecbd35c9719705960bc3ab49ab688b4c62fbc99a3
parent188acc9e8bacdbba56ed2b32d09f191da759500a
libstdc++: Format __float128 as _Float128 only when long double is not 128 IEEE [PR120976]

For powerpc64 and sparc architectures that both have __float128 and 128bit long double,
the __float128 is same type as long double/__ieee128 and already formattable.

The remaining specialization makes __float128 formattable on x86_64 via _Float128,
however __float128 is now not formattable on x86_32 (-m32) with -mlong-double-128,
where __float128 is distinct type from long double that is 128bit IEEE.

PR libstdc++/120976

libstdc++-v3/ChangeLog:

* include/std/format (formatter<__float128, _Char_T): Define if
_GLIBCXX_FORMAT_F128 == 2.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
libstdc++-v3/include/std/format