This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27141] New: Unexpected requirement for usual deallocation function
- From: "algrant at acm dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Apr 2006 08:10:36 -0000
- Subject: [Bug c++/27141] New: Unexpected requirement for usual deallocation function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This code:
struct D {
D() {}
virtual ~D() {}
void operator delete(void*, void*) {}
};
void f() { D d(); }
is rejected with "no suitable 'operator delete' for 'D'".
It is true that the placement deallocation function hides any
"usual" one, but surely it is only necessary for a usual one to
be found when implementing a delete-expression, as described
in 12.5#4. This code is accepted by Comeau and HP aC++ (but
faulted by Sun C++ with a similar error to g++).
--
Summary: Unexpected requirement for usual deallocation function
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: algrant at acm dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27141