[libc-commits] [libc] Remove wrong float-128 extension for CLang (PR #75909)

via libc-commits libc-commits at lists.llvm.org
Tue Dec 19 00:50:43 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Igor Popov (silver-popov)

<details>
<summary>Changes</summary>

Hello

It seems that CLang does not support float-128 extension, at least for x86-64 architecture.
For any OS, not only for fuchsia. So, following code causes a compilation error and should be removed.

#if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 500)) &&  \
    (defined(LIBC_TARGET_ARCH_IS_X86_64) &&                                    \
     !defined(LIBC_TARGET_OS_IS_FUCHSIA))
#define LIBC_COMPILER_HAS_FLOAT128_EXTENSION
#endif

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


1 Files Affected:

- (modified) libc/src/__support/macros/properties/float.h (-5) 


``````````diff
diff --git a/libc/src/__support/macros/properties/float.h b/libc/src/__support/macros/properties/float.h
index 756579024cad8b..1953a6b6ef6250 100644
--- a/libc/src/__support/macros/properties/float.h
+++ b/libc/src/__support/macros/properties/float.h
@@ -59,11 +59,6 @@ using float16 = _Float16;
      defined(LIBC_TARGET_ARCH_IS_X86_64))
 #define LIBC_COMPILER_HAS_C23_FLOAT128
 #endif
-#if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 500)) &&  \
-    (defined(LIBC_TARGET_ARCH_IS_X86_64) &&                                    \
-     !defined(LIBC_TARGET_OS_IS_FUCHSIA))
-#define LIBC_COMPILER_HAS_FLOAT128_EXTENSION
-#endif
 
 #if defined(LIBC_COMPILER_HAS_C23_FLOAT128)
 using float128 = _Float128;

``````````

</details>


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


More information about the libc-commits mailing list