diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h --- a/openmp/runtime/src/kmp_os.h +++ b/openmp/runtime/src/kmp_os.h @@ -300,6 +300,7 @@ // case label is intentional and should not be diagnosed by a compiler // Code from libcxx/include/__config // Use a function like macro to imply that it must be followed by a semicolon +#if !KMP_COMPILER_GCC || __GNUC__ >= 5 #if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) # define KMP_FALLTHROUGH() [[fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) @@ -309,6 +310,9 @@ #else # define KMP_FALLTHROUGH() ((void)0) #endif +#else // !KMP_COMPILER_GCC || __GNUC__ >= 5 +#define KMP_FALLTHROUGH() ((void)0) +#endif // !KMP_COMPILER_GCC || __GNUC__ >= 5 // Define attribute that indicates a function does not return #if __cplusplus >= 201103L