This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/38477] [strict-aliasing] warning message contains compiler-generated symbols



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-12-12 11:44 -------
But there is no space for _Rb_tree_node<_Val> in ctx.foo._M_t._M_impl.

        struct _Rb_tree_impl : public _Node_allocator
        {
          _Key_compare          _M_key_compare;
          _Rb_tree_node_base    _M_header;
          size_type             _M_node_count;

the _M_header member is of type _Rb_tree_node_base, so I don't see how you
can cast that to _Rb_tree_node<_Val> and expect the _M_value_field to magically
appear in memory.  At least this is what the alias analysis code complains
about and thus says this access accesses nothing (legally).

Now you can of course tell me that .D.9518 makes the difference, but this
difference is not communicated to the middle-end properly by the C++
frontend.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38477


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]