Commit d66e0dc6 by Derek Mauro Committed by Copybara-Service

absl::Optional: suppress bogus -Wmaybe-uninitialized GCC 12 warning

PiperOrigin-RevId: 454947125
Change-Id: Idbe6c8b4953c3d6147326bebc915d24dff83e7d5
parent 10ec11de
......@@ -91,7 +91,15 @@ class optional_data_dtor_base {
void destruct() noexcept {
if (engaged_) {
// `data_` must be initialized if `engaged_` is true.
#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
data_.~T();
#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
#pragma GCC diagnostic pop
#endif
engaged_ = false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment