[NFC][libunwind][AIX] Add diagnostic push and TODO
clang treats the cast here as an error since 999d4f840777bf8de26d45947192aa0728edc0fb landed
with -Xextra -Werror. We believe this cast to be safe for the reasons noted in comment, but
we should do some further cleanup at some point.
GitOrigin-RevId: 64dc55835a1552dbe74eef79460094014edf659e
diff --git a/src/aix_state_tab_eh.inc b/src/aix_state_tab_eh.inc
index 0cd9483..9f46001 100644
--- a/src/aix_state_tab_eh.inc
+++ b/src/aix_state_tab_eh.inc
@@ -195,8 +195,13 @@
_LIBCXXABI_TRACE_STATETAB0("returned from scalar destructor\n");
} else {
_LIBCXXABI_TRACE_STATETAB0("calling vector destructor\n");
+ // TODO: in the legacy ABI, destructors had a second argument. We don't expect to encounter
+ // destructors of this type in the itanium-based ABI, so this should be safe, but this could use some cleanup.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
__cxa_vec_cleanup(addr, reinterpret_cast<size_t>(fsmEntry->elementCount), fsmEntry->elemSize,
reinterpret_cast<destruct_f>(fsmEntry->destructor));
+#pragma GCC diagnostic pop
_LIBCXXABI_TRACE_STATETAB0("returned from vector destructor\n");
}
} catch (...) {