From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31119 invoked by alias); 18 Sep 2003 22:22:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31108 invoked by uid 48); 18 Sep 2003 22:22:43 -0000 Date: Thu, 18 Sep 2003 23:50:00 -0000 Message-ID: <20030918222243.31105.qmail@sources.redhat.com> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030918185509.12333.John.Bossom@cognos.com> References: <20030918185509.12333.John.Bossom@cognos.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/12333] Explicit call to MyClass::~MyClass() yields "sorry, unimplemented" X-Bugzilla-Reason: CC X-SW-Source: 2003-09/txt/msg01516.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12333 bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2003-09-18 22:22:43 date| | ------- Additional Comments From bangerth at dealii dot org 2003-09-18 22:22 ------- Interesting. With this slightly reduced code ----------------------------- struct X { void f() { X::~X(); } virtual ~X(){} }; ---------------------------------- we get from present mainline: tmp/g> ../build-gcc/gcc-install/bin/c++ -c x.cc x.cc: In member function `void X::f()': x.cc:3: error: no matching function for call to `X::X()' x.cc:5: note: candidates are: virtual X::~X() Note the message for line 3, which talks about the _con_structor, and that the candidate given on line 5 is the _de_structor :-) Alas, the whole message is wrong, the code should compile. With 3.3, we get this: tmp/g> ~/bin/gcc-3.3/bin/c++ -c x.cc x.cc: In member function `void X::f()': x.cc:3: error: 'struct X' has no member named '`type_decl' not supported by x.cc:3: sorry, unimplemented: dump_expr x.cc:3: sorry, unimplemented: ~' And then, with 3.2: tmp/g> /usr/bin/c++ -c x.cc x.cc: In member function `void X::f()': x.cc:3: cannot call destructor `X::~X' without object While playing around a little more, I also came across an ICE. Since it is a regression I opened a new PR for it: PR 12335. W.