From 9d43470921bef911145ad78a8e822ee1b297f937 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Mon, 22 May 2023 17:27:37 -0700 Subject: 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 --- absl/strings/internal/cord_rep_flat.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'absl/strings') 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; } -- cgit v1.2.3