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] Add *_HAS_SUBNORM to float.h #102182

Merged
merged 1 commit into from
Aug 7, 2024
Merged

[libc] Add *_HAS_SUBNORM to float.h #102182

merged 1 commit into from
Aug 7, 2024

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Aug 6, 2024

Summary:
These should be defined, since we provide float.h it will override the
Clang resource dir and not provide it.

Summary:
These should be defined, since we provide `float.h` it will override the
Clang resource dir and not provide it.
@jhuber6 jhuber6 requested a review from lntue August 6, 2024 17:00
@llvmbot llvmbot added the libc label Aug 6, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Aug 6, 2024

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
These should be defined, since we provide float.h it will override the
Clang resource dir and not provide it.


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

1 Files Affected:

  • (modified) libc/include/llvm-libc-macros/float-macros.h (+12)
diff --git a/libc/include/llvm-libc-macros/float-macros.h b/libc/include/llvm-libc-macros/float-macros.h
index 81c1df868bf6c..a25ef60a293d3 100644
--- a/libc/include/llvm-libc-macros/float-macros.h
+++ b/libc/include/llvm-libc-macros/float-macros.h
@@ -161,6 +161,18 @@
 #define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
 #endif // LDBL_MAX_10_EXP
 
+#ifndef FLT_HAS_SUBNORM
+#define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
+#endif // FLT_HAS_SUBNORM
+
+#ifndef DBL_HAS_SUBNORM
+#define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
+#endif // DBL_HAS_SUBNORM
+
+#ifndef LDBL_HAS_SUBNORM
+#define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
+#endif // LDBL_HAS_SUBNORM
+
 // TODO: Add FLT16 and FLT128 constants.
 
 #endif // LLVM_LIBC_MACROS_FLOAT_MACROS_H

@jhuber6 jhuber6 merged commit 3c391a6 into llvm:main Aug 7, 2024
8 checks passed
TIFitis pushed a commit that referenced this pull request Aug 8, 2024
Summary:
These should be defined, since we provide `float.h` it will override the
Clang resource dir and not provide it.
kstoimenov pushed a commit to kstoimenov/llvm-project that referenced this pull request Aug 15, 2024
Summary:
These should be defined, since we provide `float.h` it will override the
Clang resource dir and not provide it.
@jhuber6 jhuber6 deleted the float branch September 23, 2024 13:26
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.

3 participants