This should not be an error when the goto jumps outside the current block! { goto Y; int x; } Y: There is no chance of any local variable being used. This makes it impossible to use goto statements in any reasonable way without littering the code with brackets.