This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29164] Overloaded operator delete[] doesn't get called
- From: "Andreas dot Kowarz at tu-dresden dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2007 09:37:46 -0000
- Subject: [Bug c++/29164] Overloaded operator delete[] doesn't get called
- References: <bug-29164-13282@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from Andreas dot Kowarz at tu-dresden dot de 2007-03-09 09:37 -------
It seems that the bug triggers only when returning NULL in the new operators.
Returning something different ( tested with (void *)1 ) is a workaround for the
problem. Checking for not returning NULL in the new operators seems reasonable
even if it does not solve the mentioned mis-compilation of the delete
operators.
Tested for
- g++ 3.2.3
- g++ 4.1.1
- icpc 9.1 (returning NULL prevents both delete operators from being called
correctly)
Andreas
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29164