Update fallthrough__ definitions.

git-svn-id: https://svn.eduke32.com/eduke32@6447 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-09-23 03:17:29 +00:00
parent 01c073f18a
commit c07e705c48

View file

@ -226,16 +226,23 @@
# define CONSTEXPR_CXX14
#endif
#if __has_cpp_attribute(fallthrough)
# define fallthrough__ [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
# define fallthrough__ [[clang::fallthrough]]
#elif __has_cpp_attribute(gnu::fallthrough)
# define fallthrough__ [[gnu::fallthrough]]
#elif defined _MSC_VER
# define fallthrough__ __fallthrough
#else
# define fallthrough__
#ifdef __cplusplus
# if __has_cpp_attribute(fallthrough)
# define fallthrough__ [[fallthrough]]
# elif __has_cpp_attribute(clang::fallthrough)
# define fallthrough__ [[clang::fallthrough]]
# elif __has_cpp_attribute(gnu::fallthrough)
# define fallthrough__ [[gnu::fallthrough]]
# endif
#endif
#ifndef fallthrough__
# if !defined __clang__ && EDUKE32_GCC_PREREQ(7,0)
# define fallthrough__ __attribute__((fallthrough))
# elif defined _MSC_VER
# define fallthrough__ __fallthrough
# else
# define fallthrough__
# endif
#endif