zwily (owner)

Revisions

gist: 210258 Download_button fork
public
Public Clone URL: git://gist.github.com/210258.git
Embed All Files: show embed
C++ #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdlib.h>
#include <iostream>
 
class A {
public:
    A() {
        std::cout << "A ctor" << std::endl;
    }
 
    ~A() {
        std::cout << "A dtor" << std::endl;
    }
};
 
int main(int argc, char *argv[]) {
    bool done = false;
 
label:
    {
        A a;
        if (!done) {
            done = true;
            goto label;
        }
    }
 
    std::cout << "done" << std::endl;
}