This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31289] gcc412 elides code in operator delete() override method
- From: "jima at cadence dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2007 01:32:18 -0000
- Subject: [Bug c++/31289] gcc412 elides code in operator delete() override method
- References: <bug-31289-14281@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from jima at cadence dot com 2007-03-21 01:32 -------
Can you point me to a description of the C++ aliasing rules?
Is the memcpy() workaround specific to GCC, or is memcpy
part of the standard with special rules regarding aliasing?
(I ask because our code base has to work on a half-dozen
platforms, many of which don't use GCC).
Will GCC optimize the memcpy() and intermediate variable ("n") away?
With gcc323 this code comes out to about 6 instructions, so even 1 or 2
more would be a large percentage hit...
Thanks for your help!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31289