public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: sakovacs@freemail.hu To: gcc-gnats@gcc.gnu.org Subject: c++/9872: temporary destructor not called? Date: Thu, 27 Feb 2003 04:56:00 -0000 [thread overview] Message-ID: <20030227044706.12363.qmail@sources.redhat.com> (raw) >Number: 9872 >Category: c++ >Synopsis: temporary destructor not called? >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Thu Feb 27 04:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Sandor Kovacs >Release: gcc 3.2 >Organization: >Environment: intel linux suse 8.1, kernel 2.4.20-ck2, qt 3.1 >Description: Temporary object is not properly destructed (see test prg. below which eats the memory up): #include <qstring.h> void tester(QString str) { } int main(int argc, char** argv) { QString str("bug"); while (true) tester("ops: " + str); } Compiled as: gcc -I/usr/lib/qt3/include -c bug.cpp gcc -L/usr/lib/qt3/lib -lqt-mt bug.o -o bug If you specify -fno-elide-constructors it works properly (that's why I believe it is not a qt-bug) There was already a fix for this/similar bug hopefully I'm not reporting it twice (couldn't find this bug on the bug list), see http://sources.redhat.com/ml/cygwin/2001-10/msg00467.html. If you think it is a QT bug please let me know and in this case I'll drop Trolltech a line. Thanks: Sandor >How-To-Repeat: compile, run the sample program >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/x-c++src; name="bug.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="bug.cpp" LyoqCiAqIENvbXBpbGU6CiAqIGdjYyAtSS91c3IvbGliL3F0My9pbmNsdWRlIC1jIGJ1Zy5jcHAK ICogZ2NjIC1ML3Vzci9saWIvcXQzL2xpYiAtbHF0LW10IGJ1Zy5vIC1vIGJ1ZwogKi8KCiNpbmNs dWRlIDxxc3RyaW5nLmg+Cgp2b2lkIHRlc3RlcihRU3RyaW5nIHN0cikgewp9CgppbnQgbWFpbihp bnQgYXJnYywgY2hhcioqIGFyZ3YpIHsKICAgIFFTdHJpbmcgc3RyKCJidWciKTsKICAgIHdoaWxl ICh0cnVlKSB0ZXN0ZXIoIm9wczogIiArIHN0cik7Cn0K
next reply other threads:[~2003-02-27 4:56 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-27 4:56 sakovacs [this message] 2003-02-27 15:32 bangerth 2003-02-28 0:26 Sandor Kovacs 2003-02-28 0:36 Wolfgang Bangerth 2003-02-28 1:56 Sandor Kovacs 2003-02-28 2:06 Sandor Kovacs
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=20030227044706.12363.qmail@sources.redhat.com \ --to=sakovacs@freemail.hu \ --cc=gcc-gnats@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: 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).