Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
On MSVC there is no unreachable, use __trap instead
Browse files Browse the repository at this point in the history
  • Loading branch information
wmaxey committed Feb 8, 2022
1 parent e2595c1 commit 312aaf0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/cuda/std/detail/libcxx/include/cstdlib
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ void *aligned_alloc(size_t alignment, size_t size); // C11
#ifdef __GNUC__
#define _LIBCUDACXX_UNREACHABLE() __builtin_unreachable()
#else
#define _LIBCUDACXX_UNREACHABLE() _CUDA_VSTD::abort()
#if defined(__CUDA_ARCH__)
# define _LIBCUDACXX_UNREACHABLE() __trap()
#else
# define _LIBCUDACXX_UNREACHABLE() _CUDA_VSTD::abort()
#endif
#endif

_LIBCUDACXX_BEGIN_NAMESPACE_STD
Expand Down

0 comments on commit 312aaf0

Please sign in to comment.