[flang-commits] [flang] [Flang] remove assert using femode_t from AIX (PR #74500)
via flang-commits
flang-commits at lists.llvm.org
Tue Dec 5 09:52:40 PST 2023
vdonaldson wrote:
> > @madanial0 Thanks for addressing this problem!
> > This is just an assert. Could we change this to "#if 0", perhaps with a comment about windows and AIX?
>
> Not sure I follow the "#if 0" part ? do you mean instead of the defined parts for AIX and windows?
Something like this:
```
diff --git a/flang/runtime/exceptions.cpp b/flang/runtime/exceptions.cpp
index 797d0c87e601..7106ae73cddc 100644
--- a/flang/runtime/exceptions.cpp
+++ b/flang/runtime/exceptions.cpp
@@ -78,7 +78,9 @@ std::int32_t RTNAME(MapException)(int32_t except) {
// Verify that the size of ieee_modes_type and ieee_status_type objects from
// intrinsic module file __fortran_ieee_exceptions.f90 are large enough to
// hold femode_t and fenv_t objects, respectively.
-#ifndef _WIN32
+#if 0
+// femode_t is not universally defined in fenv.h
+// #if !defined(_WIN32) && !DEFINED(_AIX)
static_assert(
sizeof(femode_t) <= sizeof(int) * _FORTRAN_RUNTIME_IEEE_FEMODE_T_EXTENT,
"increase ieee_modes_type size");
```
https://github.com/llvm/llvm-project/pull/74500
More information about the flang-commits
mailing list