From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bohdan Vlasyuk To: gcc-gnats@gcc.gnu.org Subject: c++/3282: Problems with throw and destuctor callings Date: Wed, 20 Jun 2001 01:26:00 -0000 Message-id: <200106200817.f5K8Hi205241@kivc.vstu.vinnica.ua> X-SW-Source: 2001-06/msg00814.html List-Id: >Number: 3282 >Category: c++ >Synopsis: Problems with throw and destuctor callings >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Wed Jun 20 01:26:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Bohdan Vlasyuk >Release: 3.0 >Organization: VSTU >Environment: System: Linux kivc.vstu.vinnica.ua 2.4.5 #12 ÷ÔÒ þÅÒ 19 10:01:01 EEST 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../srcdir/configure --enable-threads --enable-languages=c,c++ --disable-libgcj >Description: When I want to throw class, which has other class inside, and constructor copies some properties of given class -- it look like destructors are called wrond. I guess code will explain it better: -------------------------------------- #include int global; class One { public: int num; One() { num=++global; cout << "One " <How-To-Repeat: Preprocessed file is ~600kb large. Just take file from the above, and compile it with g++ _test.cpp -o test >Fix: No ideas. >Release-Note: >Audit-Trail: >Unformatted: