[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c++/35057] Integer variable value lost due to optimizations?




------- Comment #5 from rguenth at gcc dot gnu dot org  2008-03-03 16:37 -------
  basic_endpoint()
    : data_()
  {
    asio::detail::sockaddr_in4_type& data
      = reinterpret_cast<asio::detail::sockaddr_in4_type&>(data_);
    data.sin_family = 2;
    data.sin_port = 0;
    data.sin_addr.s_addr = ((in_addr_t) 0x00000000);
  }

you are violating C/C++ type-based aliasing rules here (and in other places).


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Reply to: