This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Throw & catch bug?
- To: jorgefm at cirsa dot com
- Subject: Re: Throw & catch bug?
- From: Ross Smith <ross dot s at ihug dot co dot nz>
- Date: Thu, 08 Jul 1999 11:30:18 +1300
- CC: egcs-bugs at egcs dot cygnus dot com
- Organization: The Internet Group
- References: <C12567A7.002D5D10.00@ntdes.lgcirsa.com>
jorgefm@cirsa.com wrote:
>
> How can the destructor call twice, one after throw (incorrect) and the
> second and ok at the end of the catch.
You forgot to put any instrumentation in the copy constructor. The
compiler is behaving correctly: throwing an exception *always* copies
the object.
--
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
The good news, according to the FCC, is that television viewing won't be
interrupted by the Y2K problem. The bad news, according to the rest of
us, is that television viewing won't be interrupted by the Y2K problem.
-- Jonathan Erickson in Dr Dobb's Journal