This is the mail archive of the
mailing list for the GCC project.
Re: Explicit destructor call unrecognized
- To: egcs-bugs at cygnus dot com, jstern at citilink dot com, mrs at wrs dot com
- Subject: Re: Explicit destructor call unrecognized
- From: Josh Stern <jstern at citilink dot com>
- Date: Wed, 26 Aug 1998 18:07:45 -0500 (CDT)
- Posted-Date: Wed, 26 Aug 1998 18:07:45 -0500 (CDT)
>> Date: Wed, 26 Aug 1998 13:00:51 -0500 (CDT)
>> From: Josh Stern <firstname.lastname@example.org>
>> To: email@example.com
>> I think it is legal C++ (it's definitely useful and has worked for
>> me on other compilers).
>We must be reading different standards, I see:
> ~ class-name
I agree that looking at the standard it doesn't seem like
this syntax is correct. However, in my example, the supposedly
correct syntax is not supported by the current egcs either - i.e.
~Simple() also bombs.
this->Simple::~Simple() is accepted.
One question I have is for the case where the destructor is
virtual, is there any legal form that will result in a
call to the destructor of the derived class?
A desire to call the derived destructor, where appropriate,
was my original motivation for preferring ~*this to