Boost logo

Boost Users :

Subject: Re: [Boost-users] signals2::slot_type & g++ anti-aliasing warning
From: Brian Budge (brian.budge_at_[hidden])
Date: 2010-11-08 10:09:57


On Mon, Nov 8, 2010 at 7:00 AM, Frank Mori Hess <frank.hess_at_[hidden]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 08 November 2010, Ákos Maróy wrote:
>> when compiled with the -Wall and -O2 flags, I get the following compiler
>> warning:
>>
>> ...
>> sample.cxx:13:   instantiated from here
>> /home/maroy/src/mxp/usr/include/boost/function/function_base.hpp:321:
>> warning: dereferencing type-punned pointer will break strict-aliasing
>> rules
>> /home/maroy/src/mxp/usr/include/boost/function/function_base.hpp:325:
>> warning: dereferencing type-punned pointer will break strict-aliasing
>> rules
>
> There's already a ticket for this against Boost.Function:
>
> https://svn.boost.org/trac/boost/ticket/4538
>
> My guess is that it's just a gcc false positive, and can be ignored.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkzYEHgACgkQ5vihyNWuA4XylwCeO+0ZWPArB8mCjZfpCJyb4r5V
> zdQAn3a2keoR0lrisUlLjJmIQxSD5Z8x
> =ncYG
> -----END PGP SIGNATURE-----
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

The gcc guys have done a good job getting rid of these. You might try
a 4.5 compiler to see if the warning goes away.

  Brian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net