https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119066
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- 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 the address of an automatic variable.