]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix -Wstringop-overflow warning coming from std::vector [PR109849]
authorFrançois Dumont <frs.dumont@gmail.com>
Sat, 1 Jun 2024 20:17:19 +0000 (22:17 +0200)
committerFrançois Dumont <frs.dumont@gmail.com>
Mon, 3 Jun 2024 19:34:05 +0000 (21:34 +0200)
commit0426be454448f8cfb9db21f4f669426afb7b57c8
tree1b1264dddd67252ebe04783f92bd9706e9615a26
parentf3d6d60d2ae584a23bb7c681cbd511202953c391
libstdc++: Fix -Wstringop-overflow warning coming from std::vector [PR109849]

libstdc++-v3/ChangeLog:

PR libstdc++/109849
* include/bits/vector.tcc
(std::vector<>::_M_range_insert(iterator, _FwdIt, _FwdIt,
forward_iterator_tag))[__cplusplus < 201103L]: Add __builtin_unreachable
expression to tell the compiler that the allocated buffer is large enough to
receive current elements plus the elements of the range to insert.
libstdc++-v3/include/bits/vector.tcc