1 2 3 4 5 6 7 8 9 10 | #include <string> int main() { goto lol; { std::string x; lol: x = ""; } } |
I2luY2x1ZGUgPHN0cmluZz4KCmludCBtYWluKCkgewogICBnb3RvIGxvbDsKICAgewogICAgICBzdGQ6OnN0cmluZyB4Owpsb2w6CiAgICAgIHggPSAiIjsKICAgfQp9
prog.cpp: In function ‘int main()’: prog.cpp:7: error: jump to label ‘lol’ prog.cpp:4: error: from here prog.cpp:6: error: crosses initialization of ‘std::string x’
-
result: Compilation error (maybe you wish to see an example for C++ 4.7.2)


