[Openmp-commits] [PATCH] D56397: [OpenMP] Silence warning about fallthrough

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 15 11:49:29 PST 2019


jlpeyton added inline comments.


================
Comment at: runtime/src/kmp.h:3973-3984
+// 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 _LIBOMP_FALLTHROUGH() [[fallthrough]]
+#elif __has_cpp_attribute(clang::fallthrough)
+#  define _LIBOMP_FALLTHROUGH() [[clang::fallthrough]]
+#elif __has_attribute(fallthough) || _GNUC_VER >= 700
----------------
Move this to kmp_os.h around the noreturn attribute definition which looks very similar to this one, and rename it KMP_FALLTHROUGH.


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D56397





More information about the Openmp-commits mailing list