This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13865] New: dtor runs prematurely for loop-scoped variable
- From: "bryner at brianryner dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2004 06:26:57 -0000
- Subject: [Bug c++/13865] New: dtor runs prematurely for loop-scoped variable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For a variable declared in the initializer of a for loop, the destructor of the
object runs prior to the first iteration of the loop. This is incorrect -- the
dtor should run only when exiting the loop's scope.
--
Summary: dtor runs prematurely for loop-scoped variable
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bryner at brianryner dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13865