public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mon at hks dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/24155] New: Does not understands explicit destructor call A::~A()
Date: Fri, 30 Sep 2005 23:37:00 -0000	[thread overview]
Message-ID: <20050930233750.24155.mon@hks.com> (raw)

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


             reply	other threads:[~2005-09-30 23:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30 23:37 mon at hks dot com [this message]
2005-09-30 23:41 ` [Bug c++/24155] " pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050930233750.24155.mon@hks.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).