From ab669cad0eea4cbe59faf9a421ab01db30ebc13c Mon Sep 17 00:00:00 2001 From: Gonzalo Brito Gadeschi Date: Wed, 28 Dec 2022 06:00:31 -0800 Subject: [PATCH 1/2] Fix warnings with nvc++ as the compiler Closes #3849. --- googletest/include/gtest/internal/gtest-port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 01bfd1f13c..77549e849e 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -794,7 +794,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // Ask the compiler not to perform tail call optimization inside // the marked function. #define GTEST_NO_TAIL_CALL_ __attribute__((disable_tail_calls)) -#elif __GNUC__ +#elif __GNUC__ && !defined(__NVCOMPILER) #define GTEST_NO_TAIL_CALL_ \ __attribute__((optimize("no-optimize-sibling-calls"))) #else From 5d6ba6d3b0a836f373d5ae83688880381cb7b3d4 Mon Sep 17 00:00:00 2001 From: gonzalobg <65027571+gonzalobg@users.noreply.github.com> Date: Thu, 23 Mar 2023 10:26:58 +0100 Subject: [PATCH 2/2] Add doc comment --- googletest/include/gtest/internal/gtest-port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 77549e849e..adf6f0b5bd 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -794,7 +794,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // Ask the compiler not to perform tail call optimization inside // the marked function. #define GTEST_NO_TAIL_CALL_ __attribute__((disable_tail_calls)) -#elif __GNUC__ && !defined(__NVCOMPILER) +#elif __GNUC__ && !defined(__NVCOMPILER) // NVIDIA C++ Compiler warnings #define GTEST_NO_TAIL_CALL_ \ __attribute__((optimize("no-optimize-sibling-calls"))) #else