public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9993: [3.2/3.3/3.4 regression] destructor not called for local object created within and returned from infinite loop
@ 2003-03-16 23:50 jason
0 siblings, 0 replies; 3+ messages in thread
From: jason @ 2003-03-16 23:50 UTC (permalink / raw)
To: Jon_Udell, gcc-bugs, gcc-prs, jason, nobody
Synopsis: [3.2/3.3/3.4 regression] destructor not called for local object created within and returned from infinite loop
Responsible-Changed-From-To: unassigned->jason
Responsible-Changed-By: jason
Responsible-Changed-When: Sun Mar 16 23:50:22 2003
Responsible-Changed-Why:
nrvo
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9993
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/9993: [3.2/3.3/3.4 regression] destructor not called for local object created within and returned from infinite loop
@ 2003-03-17 18:08 jason
0 siblings, 0 replies; 3+ messages in thread
From: jason @ 2003-03-17 18:08 UTC (permalink / raw)
To: Jon_Udell, gcc-bugs, gcc-prs, jason
Synopsis: [3.2/3.3/3.4 regression] destructor not called for local object created within and returned from infinite loop
State-Changed-From-To: analyzed->closed
State-Changed-By: jason
State-Changed-When: Mon Mar 17 18:08:26 2003
State-Changed-Why:
fixed
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9993
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/9993: [3.2/3.3/3.4 regression] destructor not called for local object created within and returned from infinite loop
@ 2003-03-15 5:34 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-03-15 5:34 UTC (permalink / raw)
To: Jon_Udell, gcc-bugs, gcc-prs, nobody
Old Synopsis: destructor not called for local object created within and returned from infinite loop
New Synopsis: [3.2/3.3/3.4 regression] destructor not called for local object created within and returned from infinite loop
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Sat Mar 15 05:34:26 2003
State-Changed-Why:
Indeed:
---------------------------
extern "C" void printf (const char *, ...);
#define PRINT printf ("%s\n", __PRETTY_FUNCTION__)
struct Object {
Object() { PRINT; }
Object(const Object&) { PRINT; }
void operator=(const Object&) { PRINT; }
~Object() { PRINT; }
};
Object function() {
int i = 0;
do {
Object b;
if (i++ == 2)
return b;
} while (1);
}
int main() {
function();
}
-----------------------------
This is the output with 3.2/3.3/3.4:
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ x.cc
g/x> ./a.out
Object::Object()
Object::Object()
Object::Object()
Object::~Object()
Ups. Not right. 2.95 generates
g/x> ./a.out
Object::Object()
Object::~Object()
Object::Object()
Object::~Object()
Object::Object()
Object::Object(const Object &)
Object::~Object()
Object::~Object()
So this is a regression.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9993
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-03-17 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-16 23:50 c++/9993: [3.2/3.3/3.4 regression] destructor not called for local object created within and returned from infinite loop jason
-- strict thread matches above, loose matches on Subject: below --
2003-03-17 18:08 jason
2003-03-15 5:34 bangerth
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).