https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114945
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:6b11aed73f6601de32082a4519022d4de1ce8a8f commit r14-11507-g6b11aed73f6601de32082a4519022d4de1ce8a8f 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> (cherry picked from commit 844eed3364309bd20cbb7d6793a16b7c6b889ba4)