Possible Duplicate:
Will usinggotoleak variables?
In the following example, when goto is called to go “backwards”, the destructor of A is called. Why is it like that? Object a is not leaving its scope, is it? Does the standard say anything about this behavior regarding goto?
void f()
{
start:
A a;
goto start;
}
6.6 Jump statements [stmt.jump]
Paragraph 2:
I think the important part is: