Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc] Include FP_* macros in math.h #84996

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Conversation

petrhosek
Copy link
Member

These are used unconditionally by libc++ math.h.

This is related to issue #84879.

These are used unconditionally by libc++ math.h.

This is related to issue llvm#84879.
@petrhosek petrhosek added the libc label Mar 12, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 12, 2024

@llvm/pr-subscribers-libc

Author: Petr Hosek (petrhosek)

Changes

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 --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
 

@petrhosek petrhosek merged commit bb5921e into llvm:main Mar 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants