------- Comment #2 from rguenth at gcc dot gnu dot org  2008-05-28 22:25 -------
Constructs like

((struct sockaddr_in *)(&svaddr))->sin_port

violate C aliasing rules if svaddr is not of type struct sockaddr_in.

You can either use -fno-strict-aliasing or do the type-punning via
memcpy or by using unions.


-- 

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=36360

Reply via email to