Explicit destructor call unrecognized
Josh Stern
jstern@citilink.com
Wed Aug 26 17:28:00 GMT 1998
>> Date: Wed, 26 Aug 1998 13:00:51 -0500 (CDT)
>> From: Josh Stern <jstern@citilink.com>
>> To: egcs-bugs@cygnus.com
>> I think it is legal C++ (it's definitely useful and has worked for
>> me on other compilers).
>> ~*this;
>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
this->Simple::~Simple().
- Josh
jstern@citilink.com
More information about the Gcc-bugs
mailing list