Page MenuHomePhabricator

D57848.diff
No OneTemporary

File Metadata

Created
Tue, Jul 16, 3:50 AM

D57848.diff

Index: openmp/runtime/src/kmp_os.h
===================================================================
--- openmp/runtime/src/kmp_os.h
+++ openmp/runtime/src/kmp_os.h
@@ -300,12 +300,16 @@
// 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 __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
-# define KMP_FALLTHROUGH() [[fallthrough]]
-#elif __has_cpp_attribute(clang::fallthrough)
-# define KMP_FALLTHROUGH() [[clang::fallthrough]]
-#elif __has_attribute(fallthough) || _GNUC_VER >= 700
-# define KMP_FALLTHROUGH() __attribute__((__fallthrough__))
+#if __GNUC__ >= 5
+# if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
+# define KMP_FALLTHROUGH() [[fallthrough]]
+# elif __has_cpp_attribute(clang::fallthrough)
+# define KMP_FALLTHROUGH() [[clang::fallthrough]]
+# elif __has_attribute(fallthough) || __GNUC__ >= 7
+# define KMP_FALLTHROUGH() __attribute__((__fallthrough__))
+# else
+# define KMP_FALLTHROUGH() ((void)0)
+# endif
#else
# define KMP_FALLTHROUGH() ((void)0)
#endif

Event Timeline