------- Comment #5 from rguenth at gcc dot gnu dot org 2009-11-13 20:02 ------- There are definitely a lot of casts like
static_cast<_Link_type>(_M_node) in stl_list.h. If _M_node is ever not a rb_tree_node but only a rb_tree_node_base (which probably is the case again for the head of the tree) then this is an alias violation. Note that 4.5 will no longer warn for this because I removed the warning code as it wasn't aware of the concept of C++ dynamic types and thus lead to many false positives. There is no replacement for it, so you'll need to do code review to catch all cases. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42032