Skip to content

Commit 64dc558

Browse files
committed
[NFC][libunwind][AIX] Add diagnostic push and TODO
clang treats the cast here as an error since 999d4f8 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.
1 parent 9c970d5 commit 64dc558

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libcxxabi/src/aix_state_tab_eh.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,13 @@ static void invoke_destructor(FSMEntry* fsmEntry, void* addr) {
195195
_LIBCXXABI_TRACE_STATETAB0("returned from scalar destructor\n");
196196
} else {
197197
_LIBCXXABI_TRACE_STATETAB0("calling vector destructor\n");
198+
// TODO: in the legacy ABI, destructors had a second argument. We don't expect to encounter
199+
// destructors of this type in the itanium-based ABI, so this should be safe, but this could use some cleanup.
200+
#pragma GCC diagnostic push
201+
#pragma GCC diagnostic ignored "-Wcast-function-type"
198202
__cxa_vec_cleanup(addr, reinterpret_cast<size_t>(fsmEntry->elementCount), fsmEntry->elemSize,
199203
reinterpret_cast<destruct_f>(fsmEntry->destructor));
204+
#pragma GCC diagnostic pop
200205
_LIBCXXABI_TRACE_STATETAB0("returned from vector destructor\n");
201206
}
202207
} catch (...) {

0 commit comments

Comments
 (0)