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 double_t and float_t in math.h on baremetal #85028

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

petrhosek
Copy link
Member

This matches other targets.

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 13, 2024

@llvm/pr-subscribers-libc

Author: Petr Hosek (petrhosek)

Changes

This matches other targets.


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

1 Files Affected:

  • (modified) libc/config/baremetal/api.td (+4)
diff --git a/libc/config/baremetal/api.td b/libc/config/baremetal/api.td
index 80d0e0ba22ca51..e6746d0c5b4c7f 100644
--- a/libc/config/baremetal/api.td
+++ b/libc/config/baremetal/api.td
@@ -52,6 +52,10 @@ def IntTypesAPI : PublicAPI<"inttypes.h"> {
   let Types = ["imaxdiv_t"];
 }
 
+def MathAPI : PublicAPI<"math.h"> {
+  let Types = ["double_t", "float_t"];
+}
+
 def StdlibAPI : PublicAPI<"stdlib.h"> {
   let Types = [
     "div_t",

@nickdesaulniers
Copy link
Member

What is a double_t? Never heard of that.

@petrhosek
Copy link
Member Author

What is a double_t? Never heard of that.

See https://en.cppreference.com/w/c/numeric/math/float_t

@petrhosek petrhosek merged commit d717e7f into llvm:main Mar 15, 2024
3 of 4 checks passed
@nickdesaulniers
Copy link
Member

The types float_t and double_t are floating types at least as wide as float and double

:yikes: I wonder what haunted platform needed that!

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.

4 participants