Merge branch 'flat_combinig_add_stress_and_unint_tests' of https://github.com/mgalimu...
[libcds.git] / cds / compiler / gcc / defs.h
index 5c4fb8a3d03f32ce7ea9634b8a24eb98b86da730..f7e3c40381b98150b60a103e4c168e831015c04e 100644 (file)
@@ -1,7 +1,7 @@
 /*
     This file is a part of libcds - Concurrent Data Structures library
 
-    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
 #   define CDS_DEPRECATED( reason ) __attribute__((deprecated( reason )))
 #endif
 
+#define CDS_NORETURN __attribute__((__noreturn__))
+
 // likely/unlikely
 
 #define cds_likely( expr )   __builtin_expect( !!( expr ), 1 )
 #define cds_unlikely( expr ) __builtin_expect( !!( expr ), 0 )
 
+// Exceptions
+
+#if defined( __EXCEPTIONS ) && __EXCEPTIONS == 1
+#   define CDS_EXCEPTION_ENABLED
+#endif
+
 // double-width CAS support
 // note: gcc-4.8 does not support double-word atomics
-#if CDS_COMPILER_VERSION >= 40900
+//       gcc-4.9: a lot of crashes when use DCAS
+#if CDS_COMPILER_VERSION >= 50000
 #   if CDS_BUILD_BITS == 64
 #       ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
 #           define CDS_DCAS_SUPPORT