[Bug libstdc++/38477] [strict-aliasing] warning message contains compiler-generated symbols
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Dec 10 17:40:00 GMT 2008
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-12-10 17:37 -------
Note that the reason the diagnostic happens is either a bug in libstdc++ or
the points-to solver or the TBAA pruning in the points-to solver.
In the end we access the object 'ctx' via a pointer of type
const struct _Rb_tree_node *. So the question is if anywhere in 'ctx' there
is such a struct.
It seems to access the _M_t._M_impl._M_header field which is a
_Rb_tree_node_base
but I cannot see a _Rb_tree_node object in it. Instead _Rb_tree_node is
derived
from _Rb_tree_node_base and adds a _M_value_field. But accessing this via
this path in
struct _Rb_tree_impl : public _Node_allocator
{
_Key_compare _M_key_compare;
_Rb_tree_node_base _M_header;
size_type _M_node_count;
certainly violates aliasing rules. I do not see what _Rb_tree_impl::_S_value
wants to access. There seems to be nothing there?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |libstdc++
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38477
More information about the Gcc-bugs
mailing list