[Bug c++/12333] Explicit call to MyClass::~MyClass() yields "sorry, unimplemented"
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Thu Sep 18 23:50:00 GMT 2003
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: ~<expression error>'
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.
More information about the Gcc-bugs
mailing list