public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: smadhavan@inautix.com To: gcc-gnats@gcc.gnu.org Cc: vatsan@vsnl.com Subject: c++/5958: Multiple calls to destructor of local objects, inside a for-loop Date: Wed, 13 Mar 2002 22:06:00 -0000 [thread overview] Message-ID: <20020314060215.32552.qmail@sources.redhat.com> (raw) >Number: 5958 >Category: c++ >Synopsis: Multiple calls to destructor of local objects, inside a for-loop >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Mar 13 22:06:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Srivathsan Madhavan >Release: GCC ver. 3.0.3 >Organization: >Environment: Cygwin 1.3.9-1, Windows NT 4 SP6a, Intel PIII >Description: An extra call(s) to the destructor is made during object destruction of local objects (inside the loop). This could be understood by compiling and executing the C++ Program attached. The behaviour of the executable (created by g++) was compared with that created by Borlad C++ ver. 5.5.1 (bcc32) for Win32. I feel what the Borland Compiler is doing is right. >How-To-Repeat: Just compile the attached source code file with G++ and Borland's bcc32 (ver. 5.5.1). Execute the 2 EXEs and you will see the difference. For convenience I have given the outputs of the 2 EXEs in a comment block at the end of the source code. >Fix: -?- >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-03-14 6:06 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-03-13 22:06 smadhavan [this message] 2002-07-11 8:15 lerdsuwa 2003-01-03 20:02 paolo
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=20020314060215.32552.qmail@sources.redhat.com \ --to=smadhavan@inautix.com \ --cc=gcc-gnats@gcc.gnu.org \ --cc=vatsan@vsnl.com \ /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: linkBe 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).