Index: flang/include/flang/Common/idioms.h =================================================================== --- flang/include/flang/Common/idioms.h +++ flang/include/flang/Common/idioms.h @@ -98,9 +98,7 @@ } \ template constexpr bool T{class_trait_ns_##T::trait_value()}; -#if !defined ATTRIBUTE_UNUSED && (__clang__ || __GNUC__) -#define ATTRIBUTE_UNUSED __attribute__((unused)) -#endif +#define ATTRIBUTE_UNUSED [[maybe_unused]] // Define enum class NAME with the given enumerators, a static // function EnumToString() that maps enumerators to std::string,