Skip to content

Conversation

@SchrodingerZhu
Copy link
Contributor

@SchrodingerZhu SchrodingerZhu commented Dec 9, 2024

Changing name type to match x86-64. This resolves definition conflicts with core_crt headers.

fix #119154

@SchrodingerZhu SchrodingerZhu requested a review from lntue December 9, 2024 00:48
@llvmbot llvmbot added the libc label Dec 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 9, 2024

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

Changes

Use push_macro/pop_macro to avoid UNDERFLOW OVERFLOW conflict with core_crt headers. fix #119154.


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

1 Files Affected:

  • (modified) libc/src/__support/FPUtil/aarch64/FEnvImpl.h (+6-1)
diff --git a/libc/src/__support/FPUtil/aarch64/FEnvImpl.h b/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
index 3cea9772154fc6..ff3485de4a007d 100644
--- a/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
@@ -26,7 +26,10 @@
 
 namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
-
+#pragma push_macro("OVERFLOW")
+#undef OVERFLOW
+#pragma push_macro("UNDERFLOW")
+#undef UNDERFLOW
 struct FEnv {
   struct FPState {
     uint32_t ControlWord;
@@ -279,6 +282,8 @@ LIBC_INLINE int set_env(const fenv_t *envp) {
   return 0;
 }
 
+#pragma pop_macro("UNDERFLOW")
+#pragma pop_macro("OVERFLOW")
 } // namespace fputil
 } // namespace LIBC_NAMESPACE_DECL
 

@SchrodingerZhu SchrodingerZhu merged commit f91a5fe into llvm:main Dec 9, 2024
7 checks passed
@SchrodingerZhu SchrodingerZhu deleted the libc/woa64-fenv branch December 9, 2024 01:25
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.

[libc][math][windows] math tests cannot build with windows SDK 10.0.22621.0

3 participants