https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87192
--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> --- I think the warning is about *accessing* (read or write) out of bound, not just creating a pointer. That sounds like a separate warning (clang calls it -Warray-bounds-pointer-arithmetic).