https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109299
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- And the reason I put the hint in _M_is_local() not in the function giving the warning is that it might help in other functions too. I haven't tested it yet though.