[flang-commits] [PATCH] D104779: [flang] Tweak the conditions for the GCC 7/libstdc++ workaround

Martin Storsjö via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Jun 23 10:52:05 PDT 2021


mstorsjo added inline comments.


================
Comment at: flang/include/flang/Evaluate/type.h:145
   constexpr std::optional<std::int64_t> knownLength() const {
-#if !__clang__ && __GNUC__ == 7
+#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE == 7
     if (knownLength_ < 0) {
----------------
klausler wrote:
> You don't need to check whether _GLIBCXX_RELEASE is defined; if it is not, it'll be replaced with 0 and the test will fail anyway.
Ok, although leaving out that check cause warnings if building with -Wundef.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104779/new/

https://reviews.llvm.org/D104779



More information about the flang-commits mailing list