This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Explicit destructor call unrecognized


>> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]