https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119066
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- 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.