https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60734

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Bhargava Shastry from comment #12)
> a) and b) together imply that it is possible that _M_right points to an
> object of type _Rb_tree_node_base when cast to _Link_type in [1]. Is this a
> matter for concern?

Not especially, because we never dereference it except when it really does
point to the derived type.

We might be able to replace those with reinterpret_cast, or just return the
base pointer and delay the cast until needed.

Reply via email to