aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-01-27 22:31:26 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-01-27 23:31:03 +0000
commiteae41b4d2cc30327f9f15c7390438c46aa09ed3f (patch)
tree650a9486da7a44d6eedad6d909d64d813ce82d67 /contrib
parent00e7d024afb80e95fb36d74b1c059468d883a850 (diff)
downloadgcc-eae41b4d2cc30327f9f15c7390438c46aa09ed3f.zip
gcc-eae41b4d2cc30327f9f15c7390438c46aa09ed3f.tar.gz
gcc-eae41b4d2cc30327f9f15c7390438c46aa09ed3f.tar.bz2
libstdc++: Prevent -Wstringop-overread warning in std::deque [PR100516]
The compiler warns about the loop in deque::_M_range_initialize because it doesn't know that the number of nodes has already been correctly sized to match the size of the input. Use __builtin_unreachable to tell it that the loop will never be entered if the number of elements is smaller than a single node. libstdc++-v3/ChangeLog: PR libstdc++/100516 * include/bits/deque.tcc (_M_range_initialize<ForwardIterator>): Add __builtin_unreachable to loop. * testsuite/23_containers/deque/100516.cc: New test.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions