diff options
author | sbrandt <sbrandt@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2014-06-18 18:48:33 +0000 |
---|---|---|
committer | sbrandt <sbrandt@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2014-06-18 18:48:33 +0000 |
commit | 89e3ac45a68a776a1f788a5495862c379c514dd5 (patch) | |
tree | cccf41a2ad3b79989a8a6ecaa0a4d50daa96486b | |
parent | 2ea9bc5bfe361956caf3b5a945d595a9b5a3f8c9 (diff) |
Ticket #1634
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5121 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/make/cctk_Config.h.in | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in index 8a8a51fe..aee90a00 100644 --- a/lib/make/cctk_Config.h.in +++ b/lib/make/cctk_Config.h.in @@ -598,10 +598,14 @@ typedef enum {false, true} bool; /* Whether __builtin_unreachable exists. */ #undef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE -#ifdef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE -# define CCTK_BUILTIN_UNREACHABLE __builtin_unreachable +#ifdef __CUDACC__ +# define CCTK_BUILTIN_UNREACHABLE() asm("trap;") #else -# define CCTK_BUILTIN_UNREACHABLE() CCTK_Abort(0, 1) +# ifdef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE +# define CCTK_BUILTIN_UNREACHABLE __builtin_unreachable +# else +# define CCTK_BUILTIN_UNREACHABLE() CCTK_Abort(0, 1) +# endif #endif /* Whether __builtin_assume_aligned exists. */ |