https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105327 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Switching around the order to do: g.p_ = 0; P p (new (v) T); Fixes the warning and I think correctly.