Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Disable CATCH_INTERNAL_IGNORE_BUT_WARN for NVHPC Compilers

- NVHPC's implementation of `__builtin_constant_p` has a bug which
    results in calls to the immediately evaluated lambda expressions to be
    reported as unevaluated lambdas.

    https://developer.nvidia.com/nvidia_bug/3321845.

  - Hence, we disable CATCH_INTERNAL_IGNORE_BUT_WARN for NVHPC Compilers
Commit
c71f42cc2959de3de921fffb47d9ccd77e3e2350
Author
Jayesh Badwaik (FZ Juelich) ·
Parents
e6da4e10aeee

Files · Download .tar.gz

Changes

 src/catch2/internal/catch_compiler_capabilities.hpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp
index 956fd13f..0684050b 100644
--- a/src/catch2/internal/catch_compiler_capabilities.hpp
+++ b/src/catch2/internal/catch_compiler_capabilities.hpp
@@ -71,8 +71,13 @@
 // REQUIRE(std::string("12") + "34" == "1234")
 // ```
 //
+// Similarly, NVHPC's implementation of `__builtin_constant_p` has a bug which
+// results in calls to the immediately evaluated lambda expressions to be
+// reported as unevaluated lambdas.
+// https://developer.nvidia.com/nvidia_bug/3321845.
+//
 // Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
-#  if !defined(__ibmxl__) && !defined(__CUDACC__)
+#  if !defined(__ibmxl__) && !defined(__CUDACC__) && !defined( __NVCOMPILER )
 #    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */
 #  endif