From 05793db816ad58362c83a7dc28a314d6440e16ea Mon Sep 17 00:00:00 2001 From: David Bayer Date: Wed, 18 Feb 2026 08:44:12 +0100 Subject: [PATCH] Add missing `if_consteval_in_nonconstexpr_function` suppression for nvhpc --- libcudacxx/codegen/generate_prologue_epilogue.py | 1 + libcudacxx/include/cuda/std/__cccl/prologue.h | 1 + 2 files changed, 2 insertions(+) diff --git a/libcudacxx/codegen/generate_prologue_epilogue.py b/libcudacxx/codegen/generate_prologue_epilogue.py index b5a7babf3c5..080296a6c0f 100755 --- a/libcudacxx/codegen/generate_prologue_epilogue.py +++ b/libcudacxx/codegen/generate_prologue_epilogue.py @@ -169,6 +169,7 @@ def make_prologue(file): #endif // _CCCL_HAS_IF_CONSTEVAL_IN_CXX20() _CCCL_DIAG_SUPPRESS_NVHPC(is_constant_evaluated_in_nonconstexpr_context) +_CCCL_DIAG_SUPPRESS_NVHPC(if_consteval_in_nonconstexpr_function) _CCCL_DIAG_SUPPRESS_NVCC(3206) // "if consteval" and "if not consteval" are meaningless in a non-constexpr function _CCCL_DIAG_SUPPRESS_NVCC(3060) // call to __builtin_is_constant_evaluated appearing in a non-constexpr function always diff --git a/libcudacxx/include/cuda/std/__cccl/prologue.h b/libcudacxx/include/cuda/std/__cccl/prologue.h index a15331e391d..a25b206974e 100644 --- a/libcudacxx/include/cuda/std/__cccl/prologue.h +++ b/libcudacxx/include/cuda/std/__cccl/prologue.h @@ -332,6 +332,7 @@ _CCCL_DIAG_SUPPRESS_NVCC(3215) // "if consteval" and "if not consteval" are not #endif // _CCCL_HAS_IF_CONSTEVAL_IN_CXX20() _CCCL_DIAG_SUPPRESS_NVHPC(is_constant_evaluated_in_nonconstexpr_context) +_CCCL_DIAG_SUPPRESS_NVHPC(if_consteval_in_nonconstexpr_function) _CCCL_DIAG_SUPPRESS_NVCC(3206) // "if consteval" and "if not consteval" are meaningless in a non-constexpr function _CCCL_DIAG_SUPPRESS_NVCC(3060) // call to __builtin_is_constant_evaluated appearing in a non-constexpr function always