[flang-commits] [flang] Fix for building llvm-flang with gcc 7.5.0 (minimum LLVM required gcc version (PR #73265)

Raghu Maddhipatla via flang-commits flang-commits at lists.llvm.org
Thu Nov 23 12:22:29 PST 2023


https://github.com/raghavendhra created https://github.com/llvm/llvm-project/pull/73265

Fix for https://github.com/llvm/llvm-project/issues/68593

>From 95eb2f2f71a5119ab34420789cc7dc4e14c30c75 Mon Sep 17 00:00:00 2001
From: Raghu Maddhipatla <Raghu.Maddhipatla at amd.com>
Date: Thu, 23 Nov 2023 14:12:13 -0600
Subject: [PATCH] Fix for building llvm-flang with gcc 7.5.0 (minimum LLVM
 required gcc version.

---
 flang/include/flang/Common/enum-class.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/flang/include/flang/Common/enum-class.h b/flang/include/flang/Common/enum-class.h
index 212e784327812c9..41575d45091a8d2 100644
--- a/flang/include/flang/Common/enum-class.h
+++ b/flang/include/flang/Common/enum-class.h
@@ -63,9 +63,8 @@ constexpr std::array<std::string_view, ITEMS> EnumNames(const char *p) {
   [[maybe_unused]] static constexpr std::size_t NAME##_enumSize{ \
       ::Fortran::common::CountEnumNames(#__VA_ARGS__)}; \
   [[maybe_unused]] static inline std::string_view EnumToString(NAME e) { \
-    static const constexpr char vaArgs[]{#__VA_ARGS__}; \
     static const constexpr auto names{ \
-        ::Fortran::common::EnumNames<NAME##_enumSize>(vaArgs)}; \
+        ::Fortran::common::EnumNames<NAME##_enumSize>(#__VA_ARGS__)}; \
     return names[static_cast<std::size_t>(e)]; \
   }
 



More information about the flang-commits mailing list