https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119066
--- Comment #2 from Jonathan Wakely ---
I don't think users should be calling __cxa_atexit themselves. But since the
data argument is typically the address of a global variable with static storage
duration, it would be OK to warn if it's passed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119066
--- Comment #1 from Andrew Pinski ---
I was going to mention at_exit but that does not have a data arguments.
But __cxa_atexit does (and __aeabi_atexit too).
Warning about those might be just as useful.