https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122061
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- This would have to be a flow-sensitive warning, something like -fanalyzer. Code could change the pointers between the constructor and destructor, so you can't assume that the destructor is wrong.