https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114945
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:844eed3364309bd20cbb7d6793a16b7c6b889ba4 commit r15-9134-g844eed3364309bd20cbb7d6793a16b7c6b889ba4 Author: Jonathan Wakely <jwak...@redhat.com> Date: Mon Mar 31 12:30:44 2025 +0100 libstdc++: Fix -Warray-bounds warning in std::vector::resize [PR114945] This is yet another false positive warning fix. This time the compiler can't prove that when the vector has sufficient excess capacity to append new elements, the pointer to the existing storage is not null. libstdc++-v3/ChangeLog: PR libstdc++/114945 * include/bits/vector.tcc (vector::_M_default_append): Add unreachable condition so the compiler knows that _M_finish is not null. * testsuite/23_containers/vector/capacity/114945.cc: New test. Reviewed-by: Tomasz KamiÅski <tkami...@redhat.com>