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

via flang-commits flang-commits at lists.llvm.org
Sun Nov 26 15:37:27 PST 2023


Author: Raghu Maddhipatla
Date: 2023-11-26T17:37:22-06:00
New Revision: 3bebf3b4950494ce9d20a7b26bb6676e6a395294

URL: https://github.com/llvm/llvm-project/commit/3bebf3b4950494ce9d20a7b26bb6676e6a395294
DIFF: https://github.com/llvm/llvm-project/commit/3bebf3b4950494ce9d20a7b26bb6676e6a395294.diff

LOG: Fix for building llvm-flang with gcc 7.5.0 (minimum LLVM required gcc version (#73265)

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

Added: 
    

Modified: 
    flang/include/flang/Common/enum-class.h

Removed: 
    


################################################################################
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