[libc-commits] [libc] [libc] Include FP_* macros in math.h (PR	#84996)
    via libc-commits 
    libc-commits at lists.llvm.org
       
    Tue Mar 12 16:50:46 PDT 2024
    
    
  
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Petr Hosek (petrhosek)
<details>
<summary>Changes</summary>
These are used unconditionally by libc++ math.h.
This is related to issue #<!-- -->84879.
---
Full diff: https://github.com/llvm/llvm-project/pull/84996.diff
1 Files Affected:
- (modified) libc/include/llvm-libc-macros/math-macros.h (+6) 
``````````diff
diff --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h
index e67fe4d11b4493..db8a4ea65bd69a 100644
--- a/libc/include/llvm-libc-macros/math-macros.h
+++ b/libc/include/llvm-libc-macros/math-macros.h
@@ -11,6 +11,12 @@
 
 #include "limits-macros.h"
 
+#define FP_NAN 0
+#define FP_INFINITE 1
+#define FP_ZERO 2
+#define FP_SUBNORMAL 3
+#define FP_NORMAL 4
+
 #define MATH_ERRNO 1
 #define MATH_ERREXCEPT 2
 
``````````
</details>
https://github.com/llvm/llvm-project/pull/84996
    
    
More information about the libc-commits
mailing list