help with g++ and strict aliasing on x86-64
Andrew Haley
aph@redhat.com
Mon Nov 22 18:53:00 GMT 2010
On 11/22/2010 06:14 PM, Ian Lance Taylor wrote:
> Alberto Griggio <alberto.griggio@gmail.com> writes:
>
>> My OS is Debian GNU/Linux 5.0, compiler is
>> g++-4.1 (GCC) 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)
>> platform x86-64
>
>> head_ = new (mem) Link;
>
>> If I uncomment the "may_alias" attribute, everything works.
>
> There have been a few bugs in the handling of placement new with regard
> to aliasing. See in particular http://gcc.gnu.org/PR29286 . As far as
> I know these bugs are fixed in current releases but they are apparently
> not fixed in the older release you are using.
Ah. Albert, please ignore my posting.
It looked like astraightforward aliasing violation.
Andrew.
More information about the Gcc-help
mailing list