File tree Expand file tree Collapse file tree 3 files changed +7
-18
lines changed Expand file tree Collapse file tree 3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -100,9 +100,4 @@ macro(cage_build_configuration)
100100 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations" )
101101 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" )
102102 endif ()
103-
104- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
105- # __builtin_assume has side effects that are discarded
106- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-assume" )
107- endif ()
108103endmacro (cage_build_configuration)
Original file line number Diff line number Diff line change 88#include < type_traits>
99#include < utility>
1010
11- #if defined(_MSC_VER)
12- #define CAGE_ASSUME_TRUE (EXPR ) __assume((bool )(EXPR))
13- #elif defined(__clang__)
14- #define CAGE_ASSUME_TRUE (EXPR ) __builtin_assume((bool )(EXPR))
15- #else
16- #define CAGE_ASSUME_TRUE (EXPR )
17- #endif
18-
1911#ifdef CAGE_ASSERT_ENABLED
2012 #define CAGE_ASSERT (EXPR ) \
2113 { \
2517 int i_ = 42 ; \
2618 (void )i_; \
2719 } \
28- CAGE_ASSUME_TRUE (EXPR); \
2920 }
3021#else
31- #define CAGE_ASSERT (EXPR ) \
32- { \
33- CAGE_ASSUME_TRUE (EXPR); \
34- }
22+ #define CAGE_ASSERT (EXPR ) {}
3523#endif
3624
3725#define CAGE_THROW_SILENT (EXCEPTION, ...) \
Original file line number Diff line number Diff line change @@ -151,11 +151,17 @@ namespace cage
151151 {
152152 case SIGTERM:
153153 if (sigTermHandler)
154+ {
154155 sigTermHandler ();
156+ return ; // already handled, do not call default handler
157+ }
155158 break ;
156159 case SIGINT:
157160 if (sigIntHandler)
161+ {
158162 sigIntHandler ();
163+ return ; // already handled, do not call default handler
164+ }
159165 break ;
160166 }
161167
You can’t perform that action at this time.
0 commit comments