[flang-commits] [flang] [flang] Fix preprocessor expression for selecting 10 byte REALs (PR #106087)
Pete Steinfeld via flang-commits
flang-commits at lists.llvm.org
Mon Aug 26 08:04:06 PDT 2024
https://github.com/psteinfeld created https://github.com/llvm/llvm-project/pull/106087
The extra "defined" was causing the overall expression to incorrectly evaluate to false.
>From f6bc5b1916ed5bf706acd43e172457192b6aea31 Mon Sep 17 00:00:00 2001
From: Peter Steinfeld <psteinfeld at nvidia.com>
Date: Mon, 26 Aug 2024 07:59:29 -0700
Subject: [PATCH] [flang] Fix preprocessor expression for selecting 10 byte
REALs
The extra "defined" was causing the overall expression to incorrectly
evaluate to false.
---
flang/runtime/numeric.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flang/runtime/numeric.cpp b/flang/runtime/numeric.cpp
index 40bacf07157a27..9d6de7a9c17d91 100644
--- a/flang/runtime/numeric.cpp
+++ b/flang/runtime/numeric.cpp
@@ -147,7 +147,7 @@ inline RT_API_ATTRS CppTypeFor<TypeCategory::Integer, 4> SelectedRealKind(
#else
constexpr bool hasReal3{false};
#endif
-#if defined LDBL_MANT_DIG == 64 && !defined FLANG_RUNTIME_NO_REAL_10
+#if LDBL_MANT_DIG == 64 && !defined FLANG_RUNTIME_NO_REAL_10
constexpr bool hasReal10{true};
#else
constexpr bool hasReal10{false};
More information about the flang-commits
mailing list