[flang-commits] [flang] [flang] Fix Darwin build after 4762c6557d15 (PR #84478)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Fri Mar 8 11:35:25 PST 2024


luporl wrote:

> If this is the best fix for Darwin, please apply it to the other sites in the code that have worked around this bug in the past, too.
> 
> flang/include/flang/Evaluate/integer.h:#undef HUGE
> flang/include/flang/Evaluate/real.h:#undef HUGE
> flang/lib/Evaluate/fold-implementation.h:#undef HUGE

Thanks for the review. Setting `_POSIX_C_SOURCE` in header files would fail if `<math.h>` was already included before these headers. Instead, I have defined it in `flang/CMakeLists.txt`. I was able to perform a clean build and run `check-flang` without errors with this change.

https://github.com/llvm/llvm-project/pull/84478


More information about the flang-commits mailing list