[gcc r16-647] libstdc++: Fix preprocessor check for __float128 formatter [PR119246]
Tomasz Kaminski
tkaminsk@gcc.gnu.org
Thu May 15 07:14:30 GMT 2025
https://gcc.gnu.org/g:d010a39b9e788a1b3c58e0954c1b2c6afad8210a
commit r16-647-gd010a39b9e788a1b3c58e0954c1b2c6afad8210a
Author: Tomasz Kamiński <tkaminsk@redhat.com>
Date: Thu May 15 08:58:09 2025 +0200
libstdc++: Fix preprocessor check for __float128 formatter [PR119246]
The previous check `_GLIBCXX_FORMAT_F128 != 1` was passing if
_GLIBCXX_FORMAT_F128 was not defined, i.e. evaluted to zero.
This broke sparc-sun-solaris2.11 and x86_64-darwin.
PR libstdc++/119246
libstdc++-v3/ChangeLog:
* include/std/format: Updated check for _GLIBCXX_FORMAT_F128.
Diff:
---
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 f0b0252255d3..bfda5895e0c0 100644
--- a/libstdc++-v3/include/std/format
+++ b/libstdc++-v3/include/std/format
@@ -2973,7 +2973,7 @@ namespace __format
};
#endif
-#if defined(__SIZEOF_FLOAT128__) && _GLIBCXX_FORMAT_F128 != 1
+#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
More information about the Libstdc++-cvs
mailing list