3 #ifndef __CDS_COMPILER_GCC_DEFS_H
4 #define __CDS_COMPILER_GCC_DEFS_H
7 #define CDS_COMPILER_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
9 #if CDS_COMPILER_VERSION < 40800
10 # error "Compiler version error. GCC version 4.8.0 and above is supported"
15 # define CDS_COMPILER__NAME ("GNU C++ " __VERSION__)
17 # define CDS_COMPILER__NAME "GNU C++"
19 #define CDS_COMPILER__NICK "gcc"
21 #include <cds/compiler/gcc/compiler_macro.h>
24 #define alignof __alignof__
26 // ***************************************
30 #define CDS_RVALUE_SUPPORT
31 #define CDS_MOVE_SEMANTICS_SUPPORT
33 #define CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
35 // C++11 inline namespace
36 #define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
38 // C++11 delete definition ( function declaration = delete)
39 #define CDS_CXX11_DELETE_DEFINITION_SUPPORT
41 // C++11 explicitly-defaulted function (= default) [std 8.4.2 [dcl.fct.def.default]]
42 #define CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
45 #define CDS_CXX11_LAMBDA_SUPPORT
48 #define CDS_CONSTEXPR constexpr
51 #define CDS_NOEXCEPT_SUPPORT noexcept
52 #define CDS_NOEXCEPT_SUPPORT_(expr) noexcept(expr)
53 #define CDS_CONSTEXPR_CONST constexpr const
55 // C++11 thread_local keyword
56 #define CDS_CXX11_THREAD_LOCAL_SUPPORT
58 // Full SFINAE support
59 #define CDS_CXX11_SFINAE
61 // *************************************************
64 #define CDS_TYPE_ALIGNMENT(n) __attribute__ ((aligned (n)))
65 #define CDS_CLASS_ALIGNMENT(n) __attribute__ ((aligned (n)))
66 #define CDS_DATA_ALIGNMENT(n) __attribute__ ((aligned (n)))
69 #include <cds/compiler/gcc/compiler_barriers.h>
71 #endif // #ifndef __CDS_COMPILER_GCC_DEFS_H