summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2023-05-22 17:27:37 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-05-22 17:28:30 -0700
commit9d43470921bef911145ad78a8e822ee1b297f937 (patch)
tree47532eae7c322b5af034d4a889d7fe59d046802f
parent830dabdbf3d8eded2490be634c34e033a32bad71 (diff)
CI: Move the GCC-latest testing to GCC 13.1 on Linux
This includes an upgrade to CMake 3.26.3 and Bazel 6.2.0 This change includes support for both GCC 12 and 13 since we were only testing GCC 11 before this change. PiperOrigin-RevId: 534235753 Change-Id: I4183a02469b1c3425c52a31b71fcefe403315a42
-rw-r--r--absl/functional/CMakeLists.txt2
-rw-r--r--absl/functional/internal/any_invocable.h8
-rw-r--r--absl/strings/internal/cord_rep_flat.h8
-rw-r--r--ci/linux_docker_containers.sh2
4 files changed, 18 insertions, 2 deletions
diff --git a/absl/functional/CMakeLists.txt b/absl/functional/CMakeLists.txt
index 628b2ffc..c704e049 100644
--- a/absl/functional/CMakeLists.txt
+++ b/absl/functional/CMakeLists.txt
@@ -39,7 +39,7 @@ absl_cc_test(
"any_invocable_test.cc"
"internal/any_invocable.h"
COPTS
- ${ABSL_DEFAULT_COPTS}
+ ${ABSL_TEST_COPTS}
DEPS
absl::any_invocable
absl::base_internal
diff --git a/absl/functional/internal/any_invocable.h b/absl/functional/internal/any_invocable.h
index a5c22ad0..a52fa876 100644
--- a/absl/functional/internal/any_invocable.h
+++ b/absl/functional/internal/any_invocable.h
@@ -135,8 +135,16 @@ void InvokeR(F&& f, P&&... args) {
template <class ReturnType, class F, class... P,
absl::enable_if_t<!std::is_void<ReturnType>::value, int> = 0>
ReturnType InvokeR(F&& f, P&&... args) {
+ // GCC 12 has a false-positive -Wmaybe-uninitialized warning here.
+#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
return absl::base_internal::invoke(std::forward<F>(f),
std::forward<P>(args)...);
+#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
+#pragma GCC diagnostic pop
+#endif
}
//
diff --git a/absl/strings/internal/cord_rep_flat.h b/absl/strings/internal/cord_rep_flat.h
index e3e27fcd..27c4b21e 100644
--- a/absl/strings/internal/cord_rep_flat.h
+++ b/absl/strings/internal/cord_rep_flat.h
@@ -120,8 +120,16 @@ struct CordRepFlat : public CordRep {
// Round size up so it matches a size we can exactly express in a tag.
const size_t size = RoundUpForTag(len + kFlatOverhead);
void* const raw_rep = ::operator new(size);
+ // GCC 13 has a false-positive -Wstringop-overflow warning here.
+ #if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(13, 0)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstringop-overflow"
+ #endif
CordRepFlat* rep = new (raw_rep) CordRepFlat();
rep->tag = AllocatedSizeToTag(size);
+ #if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(13, 0)
+ #pragma GCC diagnostic pop
+ #endif
return rep;
}
diff --git a/ci/linux_docker_containers.sh b/ci/linux_docker_containers.sh
index dcaf18b9..4dfa3175 100644
--- a/ci/linux_docker_containers.sh
+++ b/ci/linux_docker_containers.sh
@@ -17,5 +17,5 @@
readonly LINUX_ALPINE_CONTAINER="gcr.io/google.com/absl-177019/alpine:20201026"
readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20230217"
-readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20230217"
+readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20230517"
readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20230120"