public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Michal Furmanczyk" <mf@cfdrc.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: c++/4250: destructor is not called during stack unwinding after exception
Date: Mon, 10 Sep 2001 10:46:00 -0000	[thread overview]
Message-ID: <20010910174603.17307.qmail@sourceware.cygnus.com> (raw)

The following reply was made to PR c++/4250; it has been noted by GNATS.

From: "Michal Furmanczyk" <mf@cfdrc.com>
To: <rodrigc@gcc.gnu.org>
Cc: <gcc-gnats@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>,
        <nobody@gcc.gnu.org>
Subject: Re: c++/4250: destructor is not called during stack unwinding after exception
Date: Mon, 10 Sep 2001 12:41:59 -0500

 Hi,
 
 Finally I managed to find space on my computer and installed GCC 3.0.1.
 The new version of compiler work fine, the problem not longer exists!!!
 
 Anyway, I put the complete test.cpp file below.
 I recompiled some of our programs with new compiler and
 I'm impressed with speed improvement I received (compared to egcs).
 You guys made the excellent job.
 
 I would like to signal one problem with your GCC bug reporting web page.
 It states that it is possible to make Online Test Compilation with last
 night's snapshot at Code Sourcery.
 I tried it, before I sent bug report (additionally to tests I performed on
 my own computer with GCC 3.0)
 and the binary generated from this web site fail to pass this test. So now I
 am confused.
 I suppose that the compiler used by Code Sourcery is old and suggestion form
 web page
 http://www.gnu.org/software/gcc/bugs.html#report to use it for tests of
 current compiler is misleading.
 
 Michal
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4250&database=gcc
 
 The test.cpp file:
 
 #include <iostream>
 #include <stdexcept>
 
 class Test {
 public:
   Test() { std::cerr << "ctor called" << std::endl; }
   ~Test() { std::cerr << "dtor called" << std::endl; }
 };
 
 void e() {
   // it can throw anything
   throw std::logic_error("test");
 }
 
 void f() {
   Test t;
   try {
     e();
   }
   catch(std::runtime_error&) {
   // this should not catch exception from e function
   // if exception is catch at the first try-catch block
   // containing throw point code generated by GCC work correctly
   }
 }
 
 int main() {
   try {
     f();
   }
   catch(std::exception&) {
   // exception is catch here, outside of f function
   // it means t should be already destroyed
   }
   return 0;
 }
 
 


             reply	other threads:[~2001-09-10 10:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-10 10:46 Michal Furmanczyk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-10 12:35 rodrigc
2001-09-07 22:11 rodrigc
2001-09-06  9:46 mf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010910174603.17307.qmail@sourceware.cygnus.com \
    --to=mf@cfdrc.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).