Great g++ bug! Local destructor isn't called!

Momchil Velikov velco@fadata.bg
Wed Mar 10 16:49:00 GMT 2004


>>>>> "Moore" == Moore, Mathew L <MooreML@BATTELLE.ORG> writes:

Moore> <snip>
>> BTW, in general, I've found that it's usually best NOT to put 
>> in throw 
>> specifications for functions / methods.  Ever.  (This 
>> restriction does not 
>> apply to putting in the "throw() -- I throw nothing, ever" 
>> specification.  But even that should be used with great caution.)
>> 

Moore> Just out of curiosity, what is the reasoning for this?  Is this for g++
Moore> specifically, or C++ in general?

  It must intercept thrown exceptiions and call ``unexpected()'' if
they do not match the specification.  Pure overhead.

  Including ``throw()''.  

~velco



More information about the Gcc-help mailing list