[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flightgear-devel
Subject:    Re: [Flightgear-devel] Compiler Warnings => Merge Request
From:       ThorstenB <brehmt () gmail ! com>
Date:       2010-09-28 7:10:02
Message-ID: AANLkTikWAacJ0KXssrq4sxk94TioG2_XOz1j5H8mWKFv () mail ! gmail ! com
[Download RAW message or body]

Hi,

On 2010-09-28, at 01:11, Csaba Halász wrote:
> > I fixed the strict-aliasing issues reported by GCC 4.4.1. Affects the
> > generic.cxx and multiplaymgr.cxx modules.
>
> Unfortunately the trick with the union in multiplaymgr.cxx is not
> standard C, as far as I know.

well, unions are ANSI C. I guess you mean the write to one union
member and read another member bit isn't standard?

Even if it proves nothing, there are already several places using
unions for this purpose. The multiplayer module also relies on it:
tiny_xdr.cxx uses several unions to convert floats and doubles.
Likewise, unions u32 and u64 are used for this in generic.cxx. So, at
least the trick isn't new to FlightGear :-).
But I noticed the entire "FGMultiplayMgr::MsgBuf" is a union already.
So I removed the introduction of a new one, reducing the patch for
multiplaymgr to a minimum (updated
http://gitorious.org/fg/flightgear/merge_requests/7 ).

cheers,
Thorsten

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic