[libc-commits] [libc] [libc] Update minimum clang version for cfloat128. (PR #242396)

via libc-commits libc-commits at lists.llvm.org
Fri Nov 13 08:50:37 PST 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Alex Strelnikov (strel-12)

<details>
<summary>Changes</summary>

This fixes a build issue caused by #<!-- -->241999, which updated the minimum version for using `__float128`.

A follow-up will move LIBC_TYPES_HAS_FLOAT128 from llvm-libc-types/float128.h to llvm-libc-macros/ so it can be used in cfloat128-macros.h.

---
Full diff: https://github.com/llvm/llvm-project/pull/242396.diff


1 Files Affected:

- (modified) libc/include/llvm-libc-macros/cfloat128-macros.h (+2-2) 


``````````diff
diff --git a/libc/include/llvm-libc-macros/cfloat128-macros.h b/libc/include/llvm-libc-macros/cfloat128-macros.h
index ff4aa530685de..e8e513944163f 100644
--- a/libc/include/llvm-libc-macros/cfloat128-macros.h
+++ b/libc/include/llvm-libc-macros/cfloat128-macros.h
@@ -14,12 +14,12 @@
 // Currently, the complex variant of C23 `_Float128` type is only defined as a
 // built-in type in GCC 7 or later, for C and in GCC 13 or later, for C++. For
 // clang, the complex variant of `__float128` is defined instead, and only on
-// x86-64 targets for clang 11 or later.
+// x86-64 targets for clang 18.1 or later.
 //
 // TODO: Update the complex variant of C23 `_Float128` type detection again when
 // clang supports it.
 #ifdef __clang__
-#if (__clang_major__ >= 11) &&                                                 \
+#if (__clang_major__ * 100 + __clang_minor__ >= 1801) &&                       \
     (defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__))
 // Use _Complex __float128 type. clang uses __SIZEOF_FLOAT128__ or __FLOAT128__
 // macro to notify the availability of __float128 type:

``````````

</details>


https://github.com/llvm/llvm-project/pull/242396


More information about the libc-commits mailing list