From 904fb3a16560e822df2a3c1687f8a0bec73b0f7d Mon Sep 17 00:00:00 2001 From: Wesley Maxey Date: Wed, 20 Mar 2024 14:11:25 -0700 Subject: [PATCH] Suppress warning 940 for unreachable code in variant --- libcudacxx/include/cuda/std/detail/libcxx/include/variant | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/variant b/libcudacxx/include/cuda/std/detail/libcxx/include/variant index 8774b62c35b..a3dfbe049ba 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/variant +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/variant @@ -617,6 +617,7 @@ struct __variant _CUDA_VSTD::forward<_Vs>(__vs)...); } +_CCCL_NV_DIAG_SUPPRESS(940) // Suppress no return at end of function // This overload is needed to tell the compiler that the recursion is indeed limited template inline _LIBCUDACXX_HIDDEN _LIBCUDACXX_INLINE_VISIBILITY static constexpr decltype(auto) __visit_impl( @@ -640,6 +641,7 @@ struct __variant } _LIBCUDACXX_UNREACHABLE(); } +_CCCL_NV_DIAG_DEFAULT(940) // End suppression of no return at end of function template inline _LIBCUDACXX_HIDDEN _LIBCUDACXX_INLINE_VISIBILITY static constexpr decltype(auto)