Add a pragma to disable a stringop-overflow warning for GCC12+

PiperOrigin-RevId: 591894838
Change-Id: Ib3fe72d255f49320e2728c210ba1faabc81e0ef8
diff --git a/absl/strings/internal/cord_internal.h b/absl/strings/internal/cord_internal.h
index a487fd5..8744540 100644
--- a/absl/strings/internal/cord_internal.h
+++ b/absl/strings/internal/cord_internal.h
@@ -101,8 +101,16 @@
     if (nullify_tail) {
       memset(dst + 7, 0, 8);
     }
+    // GCC 12 has a false-positive -Wstringop-overflow warning here.
+#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
     memcpy(dst, &buf1, 8);
     memcpy(dst + n - 8, &buf2, 8);
+#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
+#pragma GCC diagnostic pop
+#endif
   } else if (n >= 4) {
     uint32_t buf1;
     uint32_t buf2;