On 19/02/2012, at 1:52 AM, Brian Knox wrote:
> 
> tcp_listener.cpp: In member function ‘int 
> zmq::tcp_listener_t::get_address(std::string*)’:
> tcp_listener.cpp:148: error: dereferencing pointer ‘sa.120’ does break 
> strict-aliasing rules

Nice that sa.120 is an impossible piece of syntax ..:)

> tcp_listener.cpp:148: note: initialized from here
> 
> <     struct sockaddr sa;
> 
> <         port = ntohs( ((struct sockaddr_in *)&sa)->sin_port);


Probably this. Casting a pointer to X to pointer to Y and then dereferencing
it isn't allowed (except in a few special cases, eg void, integers
of the same size).

--
john skaller
skal...@users.sourceforge.net




_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to