H
Henrik Goldman
Hi,
I'm seeing a weird problem on hp-ux (ia64) using g++ 4.1.1.
Here below is a tiny bit of code which sets up the nessecary code for doing
a select():
fd_set fdread, fdwrite;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_SET(m_IncomingSocket.GetSocket(), &fdread);
FD_SET(m_IncomingSocket.GetSocket(), &fdwrite);
For the last two lines I get the following warning:
warning: dereferencing type-punned pointer will break strict-aliasing rules
warning: dereferencing type-punned pointer will break strict-aliasing rules
I don't really understand why 'clean' code would give such a warning since
it's structures which are defined by the system.
However perhaps someone could tell me what it actually means and eventually
how to solve it? My g++ optimization is O2.
Thanks in advance.
-- Henrik
I'm seeing a weird problem on hp-ux (ia64) using g++ 4.1.1.
Here below is a tiny bit of code which sets up the nessecary code for doing
a select():
fd_set fdread, fdwrite;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_SET(m_IncomingSocket.GetSocket(), &fdread);
FD_SET(m_IncomingSocket.GetSocket(), &fdwrite);
For the last two lines I get the following warning:
warning: dereferencing type-punned pointer will break strict-aliasing rules
warning: dereferencing type-punned pointer will break strict-aliasing rules
I don't really understand why 'clean' code would give such a warning since
it's structures which are defined by the system.
However perhaps someone could tell me what it actually means and eventually
how to solve it? My g++ optimization is O2.
Thanks in advance.
-- Henrik