[Bug tree-optimization/39207] [4.4 Regression] Strict aliasing warnings in libstdc++ headers
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Feb 16 21:05:00 GMT 2009
------- Comment #2 from jakub at gcc dot gnu dot org 2009-02-16 21:05 -------
I believe all 3 are the same issue.
static const_reference _S_value (_Const_Base_ptr __x)
{
return static_cast < _Const_Link_type > (__x)->_M_value_field;
}
casts pointer to _Rb_tree_node_base to pointer to pointer to _Rb_tree_node
<_Val> and then dereferences it.
Given that:
template < typename _Val > struct _Rb_tree_node:public _Rb_tree_node_base
{ ... };
at least the initial portion of the structs is the same.
_S_value is called by _S_key with the same argument, which is called from
_M_lower_bound template (_Link_Type aka. _Rb_tree_node_base isn't const in that
pointer anymore).
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bkoz at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39207
More information about the Gcc-bugs
mailing list