help-gplusplus
[Top][All Lists]
Advanced

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

Re: Type punned-pointers


From: Ulrich Lauther
Subject: Re: Type punned-pointers
Date: Fri, 9 Jun 2006 15:50:23 +0000 (UTC)

Henrik Goldman <henrik_goldman@mail.tele.dk> wrote:
: 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

FD_SET is probably a macro. I would take a look at the expanded code, which
might try to do some illegal pointer assignment.




-- 
        -lauther

[nosave]
----------------------------------------------------------------------------
Ulrich Lauther          ph: +49 89 636 48834 fx: ... 636 42284
Siemens CT SE 6         Internet: Ulrich.Lauther@siemens.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]