[Bug c++/13865] New: dtor runs prematurely for loop-scoped variable
bryner at brianryner dot com
gcc-bugzilla@gcc.gnu.org
Mon Jan 26 06:26:00 GMT 2004
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
More information about the Gcc-bugs
mailing list