[Bug libstdc++/60734] Undefined behavior in g++-v4/bits/stl_tree.h
bshastry at sec dot t-labs.tu-berlin.de
gcc-bugzilla@gcc.gnu.org
Thu Aug 27 12:13:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60734
Bhargava Shastry <bshastry at sec dot t-labs.tu-berlin.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bshastry at sec dot t-labs.tu-berl
| |in.de
--- Comment #9 from Bhargava Shastry <bshastry at sec dot t-labs.tu-berlin.de> ---
Hi. I just noticed that there are two more instances of the undefined downcast
via static_cast that are not fixed by the said patch.
### Lines borrowed from bits/stl_tree.h [gcc 5.1.0]
883. iterator
884. end() _GLIBCXX_NOEXCEPT
885. { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header));
}
886.
887. const_iterator
888. end() const _GLIBCXX_NOEXCEPT
889. {
890. return const_iterator(static_cast<_Const_Link_type>
891. (&this->_M_impl._M_header));
892. }
The undefined casts happen on line 885 and 890--891.
More information about the Gcc-bugs
mailing list