[Openmp-commits] [PATCH] D56397: [OpenMP] Silence warning about fallthrough
David Callahan via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Feb 6 12:23:51 PST 2019
david2050 added a comment.
This change breaks builds fort compilers because the "&&" in the preprocessor does not protect the case that __has_cpp_attribute is not defined. Better
#if __cplusplus > 201402L
#if __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__))
#endif
#endif
#if !defined(KMP_FALLTHROUGH)
# define KMP_FALLTHROUGH() ((void)0)
#endif
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56397/new/
https://reviews.llvm.org/D56397
More information about the Openmp-commits
mailing list