mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-31 11:10:33 +00:00
compat.h: Add preliminary FALLTHROUGH macro to support
git-svn-id: https://svn.eduke32.com/eduke32@6353 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4252a60af9
commit
37b2a751b9
1 changed files with 14 additions and 0 deletions
|
@ -30,6 +30,9 @@
|
|||
#ifndef __has_extension
|
||||
# define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
|
||||
#endif
|
||||
#ifndef __has_cpp_attribute
|
||||
# define __has_cpp_attribute(x) 0
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define EDUKE32_MSVC_PREREQ(major) ((major) <= (_MSC_VER))
|
||||
|
@ -223,6 +226,17 @@
|
|||
# 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]]
|
||||
#else
|
||||
# define FALLTHROUGH
|
||||
#endif
|
||||
|
||||
|
||||
////////// Platform detection //////////
|
||||
|
||||
#if defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __bsdi__ || defined __DragonFly__
|
||||
|
|
Loading…
Reference in a new issue