gcc 2.95.2 fails to destroy objects created by 'throw'

Chris Wedgwood cw@f00f.org
Sun Mar 19 16:56:00 GMT 2000


Platforms:   ALL? (Sparc32 and x86 tested)

Description: gcc 2.95.2 (as found on any GNU mirror) fails to call
             the destructor for objects created by throw (or any
             copies of these objects).

Comments:    It looks like SuSe, RedHat and Debian have patches to
             fix this that are not part of the main-branch?

Attached is some code to demonstrate this. If you alter the catch
like to catch an object not a reference, you can see that isn't
destroyed either.

I have patches to correct this that I pulled out of the Debian diffs,
they are somewhat extensive and probably impact many other things.
Let me know if you want these.



-cw







More information about the Gcc-bugs mailing list