[Bug c++/12680] C++ destructor called too early on temporary objects

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Sun Oct 19 17:10:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12680



------- Additional Comments From gdr at integrable-solutions dot net  2003-10-19 16:55 -------
Subject: Re:  New: C++ destructor called too early on temporary objects

"drtr at dial dot pipex dot com" <gcc-bugzilla@gcc.gnu.org> writes:

| When a temporary object is created, the C++ standard requires the
| destructor to be called at the end of the enclosing block, not when
| the object goes out of scope.

This claim is false.  The C++ standard requires temporary objects
destruction at the end of the full expressions that contain them.

This PR should be resolved as INVALID.

-- Gaby



More information about the Gcc-bugs mailing list