gtest/gtest-gcc11.patch
Troy Dawson 24e90d16ab RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/gtest#41e5efd7adc3bb052d96d61279beef52676da94e
2020-11-16 13:05:18 -08:00

16 lines
605 B
Diff

diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
index da09a1c..4d6343f 100644
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -1289,7 +1289,10 @@ static void StackLowerThanAddress(const void* ptr,
GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
static void StackLowerThanAddress(const void* ptr, bool* result) {
int dummy;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpointer-compare"
*result = (&dummy < ptr);
+#pragma GCC diagnostic push
}
// Make sure AddressSanitizer does not tamper with the stack here.