This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24155] New: Does not understands explicit destructor call A::~A()
- From: "mon at hks dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Sep 2005 23:37:53 -0000
- Subject: [Bug c++/24155] New: Does not understands explicit destructor call A::~A()
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The latest GNU G++ compiler, distributed with latest RedHat and SUSE
distributions, does not understand explicit destructor calls of the
form "A::~A()". Here is an example:
class Pool {
public:
~Pool();
void Delete();
};
Pool::~Pool()
{
}
void Pool::Delete()
{
Pool::~Pool();
}
>>> g++ -c mem.C
mem.C: In member function `void Pool::Delete()':
mem.C:14: error: no matching function for call to `Pool::Pool()'
mem.C:9: note: candidates are: Pool::~Pool()
It looks like the tilda (~) is throwing it off.
Additional version information:
C++ version 3.4.3 20050227 (Red Hat 3.4.3-22.1) (i386-redhat-linux)
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1)
/usr/libexec/gcc/i386-redhat-linux/3.4.3/cc1plus -E -quiet -v -D_GNU_SOURCE
mem.C -o mem.ii
This was identified on Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
--
Summary: Does not understands explicit destructor call A::~A()
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mon at hks dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 3.4.3 20050227 (Red Hat 3.4.3-22.1)
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24155