http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56104
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-25 15:05:48 UTC --- Given the /* If the object is not dynamic the access invokes undefined behavior. As it is not executed in this case silence the spurious warnings it may provoke. */ comment after it, can't we just build the INDIRECT_REF by hand instead of cp_build_indirect_ref ? Or revert richi's hunk and force always POINTER_PLUS_EXPR, even for zero offset? Then this warning isn't emitted.