help with g++ and strict aliasing on x86-64

Ian Lance Taylor
Mon Nov 22 18:37:00 GMT 2010

Alberto Griggio <> 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 .  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.


More information about the Gcc-help mailing list