summaryrefslogtreecommitdiff
path: root/abseil-cpp/absl/algorithm/algorithm_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'abseil-cpp/absl/algorithm/algorithm_test.cc')
-rw-r--r--abseil-cpp/absl/algorithm/algorithm_test.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/abseil-cpp/absl/algorithm/algorithm_test.cc b/abseil-cpp/absl/algorithm/algorithm_test.cc
index 81fccb6..d18df02 100644
--- a/abseil-cpp/absl/algorithm/algorithm_test.cc
+++ b/abseil-cpp/absl/algorithm/algorithm_test.cc
@@ -20,6 +20,7 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
+#include "absl/base/config.h"
namespace {
@@ -50,7 +51,15 @@ TEST(EqualTest, EmptyRange) {
std::vector<int> empty1;
std::vector<int> empty2;
+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105705
+#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnonnull"
+#endif
EXPECT_FALSE(absl::equal(v1.begin(), v1.end(), empty1.begin(), empty1.end()));
+#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
+#pragma GCC diagnostic pop
+#endif
EXPECT_FALSE(absl::equal(empty1.begin(), empty1.end(), v1.begin(), v1.end()));
EXPECT_TRUE(
absl::equal(empty1.begin(), empty1.end(), empty2.begin(), empty2.end()));