I've thought of following code by trying to solve a difficult 'nested-condition' problem:
goto error;
if (false)
{
error:
cout << "error block" << endl;
}
else
{
cout << "else block" << endl;
}
When I run this code, only error block is displayed, as expected (I guess?). But is this defined behavior across all compilers?