[Openmp-commits] [PATCH] D57851: Guard a feature that unsupported by old GCC

Taewook Oh via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Feb 8 09:16:27 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL353538: Guard a feature that unsupported by old GCC (authored by twoh, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D57851?vs=185914&id=185989#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57851/new/

https://reviews.llvm.org/D57851

Files:
  openmp/trunk/runtime/src/kmp_os.h


Index: openmp/trunk/runtime/src/kmp_os.h
===================================================================
--- openmp/trunk/runtime/src/kmp_os.h
+++ openmp/trunk/runtime/src/kmp_os.h
@@ -39,6 +39,14 @@
 #define KMP_MEM_CONS_MODEL KMP_MEM_CONS_VOLATILE
 #endif
 
+#ifndef __has_cpp_attribute
+#define __has_cpp_attribute(x) 0
+#endif
+
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+
 /* ------------------------- Compiler recognition ---------------------- */
 #define KMP_COMPILER_ICC 0
 #define KMP_COMPILER_GCC 0
@@ -304,7 +312,7 @@
 #  define KMP_FALLTHROUGH() [[fallthrough]]
 #elif __has_cpp_attribute(clang::fallthrough)
 #  define KMP_FALLTHROUGH() [[clang::fallthrough]]
-#elif __has_attribute(fallthough) || _GNUC_VER >= 700
+#elif __has_attribute(fallthough) || __GNUC__ >= 7
 #  define KMP_FALLTHROUGH() __attribute__((__fallthrough__))
 #else
 #  define KMP_FALLTHROUGH() ((void)0)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57851.185989.patch
Type: text/x-patch
Size: 914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190208/c99c69bd/attachment.bin>


More information about the Openmp-commits mailing list