From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1869 invoked by alias); 10 Mar 2004 14:52:44 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 1862 invoked from network); 10 Mar 2004 14:52:44 -0000 Received: from unknown (HELO gate.algorithm.aelita.com) (212.176.18.2) by sources.redhat.com with SMTP; 10 Mar 2004 14:52:44 -0000 Received: from bagman.edm.com ([10.0.0.4]) by gate.algorithm.aelita.com (Post.Office MTA v3.5.3 release 223 ID# 0-12345L500S10000V35) with ESMTP id com for ; Wed, 10 Mar 2004 17:52:42 +0300 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Subject: RE: Great g++ bug! Local destructor isn't called! Date: Wed, 10 Mar 2004 15:38:00 -0000 Message-ID: <3F6F4712B759A34ABD453A8B39C10D6201F2C8EC@bagman.edm.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Assinovsky, Lev" To: "Eljay Love-Jensen" , X-SW-Source: 2004-03/txt/msg00094.txt.bz2 > -----Original Message----- > From: Eljay Love-Jensen [mailto:eljay@adobe.com] > Sent: Wednesday, March 10, 2004 5:46 PM > To: Assinovsky, Lev; gcc-help@gcc.gnu.org > Subject: Re: Great g++ bug! Local destructor isn't called! >=20 >=20 > Hi Lev, >=20 > I notice that if the throw(int) specification is taken off the Raiser=20 > constructor, then the ~Object() is called with -O3. >=20 > (I'm using GCC 3.3.1 on CygWin / Windows XP.) >=20 > Very odd. Good catch. Have you filed a bug? Not yet. >=20 > BTW, in general, I've found that it's usually best NOT to put=20 > in throw=20 > specifications for functions / methods. Ever.=20 Too late!! We have tons of code with exception specification! (This=20 > restriction does not=20 > apply to putting in the "throw() -- I throw nothing, ever"=20 > specification. But even that should be used with great caution.) >=20 > If C++ did exception specifications like how Java does them,=20 > then that'd be=20 > a different story. >=20 > --Eljay >=20 >=20 ---- Lev Assinovsky Aelita Software Corporation O&S InTrust Framework Division, Team Leader ICQ# 165072909