re PR libstdc++/21172 (potential integer overflow error in STL heap functions)
authorPaolo Carlini <pcarlini@suse.de>
Tue, 13 Feb 2007 00:25:30 +0000 (00:25 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 13 Feb 2007 00:25:30 +0000 (00:25 +0000)
commitbad333ffe374313f11880ee8b1792bd05ff9f725
tree425fc9e1ce06d50cf40508800cd51b380d82dd05
parent51d4712ed1c31cd4408298591373e4acf90c829e
re PR libstdc++/21172 (potential integer overflow error in STL heap functions)

2007-02-12  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/21172
* include/bits/stl_heap.h (__adjust_heap(_RandomAccessIterator,
_Distance, _Distance, _Tp), __adjust_heap(_RandomAccessIterator,
_Distance, _Distance, _Tp, _Compare)): Avoid potential integer
overflow.

* include/bits/stl_heap.h (__is_heap(_RandomAccessIterator,
_RandomAccessIterator), __is_heap(_RandomAccessIterator,
_RandomAccessIterator, _StrictWeakOrdering): Mark inline.
(make_heap(_RandomAccessIterator, _RandomAccessIterator,
_Compare)): Do not mark inline.

* include/bits/stl_heap.h (push_heap(_RandomAccessIterator,
_RandomAccessIterator), sort_heap(_RandomAccessIterator,
_RandomAccessIterator)): Uncomment __glibcxx_requires_heap.

From-SVN: r121875
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_heap.h