Bug 24155 - Does not understands explicit destructor call A::~A()
Summary: Does not understands explicit destructor call A::~A()
Status: RESOLVED DUPLICATE of bug 12333
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.3
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-30 23:37 UTC by mon
Modified: 2005-09-30 23:41 UTC (History)
1 user (show)

See Also:
Host: i386-redhat-linux
Target: i386-redhat-linux
Build: 3.4.3 20050227 (Red Hat 3.4.3-22.1)
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mon 2005-09-30 23:37:50 UTC
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)
Comment 1 Andrew Pinski 2005-09-30 23:41:12 UTC

*** This bug has been marked as a duplicate of 12333 ***