https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109731
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- It seems that it's considered safe because Token::lexer_ is const, so GCC thinks the value of token->lexer_ can't be changed by the ~Lexer() destructor. That's true, but 'token' can become an invalid pointer.