[libc-commits] [libc] [libc] Add Q length modifier to support float128 conversions in printf (PR #203077)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Tue Jun 30 12:47:01 PDT 2026
================
@@ -665,12 +690,19 @@ template <typename ArgProvider> class Parser {
case ('A'):
case ('g'):
case ('G'):
- if (lm != LengthModifier::L)
- conv_size = type_desc_from_type<double>();
+#if defined(LIBC_INTERNAL_PRINTF_CONVERT_FLOAT128)
+ if (lm == LengthModifier::Q) {
+ conv_size = type_desc_from_type<float128>();
+ } else
+#endif // LIBC_INTERNAL_PRINTF_CONVERT_FLOAT128
#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
- else
+ if (lm == LengthModifier::L) {
conv_size = type_desc_from_type<long double>();
+ } else
#endif // !LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+ {
+ conv_size = type_desc_from_type<double>();
+ }
----------------
michaelrj-google wrote:
it looks like you updated the other conditions, but not this one.
https://github.com/llvm/llvm-project/pull/203077
More information about the libc-commits
mailing list