J
Johannes Schaub (litb)
Hello all. I wonder what the reason is for labels having a substatement?
int main() {
...
goto end;
....
end:
}
That's not allowed because it needs a trailing statement after "end:", like
the null statement ";". What is the reason that "foo:" is not a single
statement, that can be combined in compound statements with other
statements? I can only think of one case:
if(1)
foo: bar; // won't work if labels are leaf statements
Is there any more compelling reason behind this?
int main() {
...
goto end;
....
end:
}
That's not allowed because it needs a trailing statement after "end:", like
the null statement ";". What is the reason that "foo:" is not a single
statement, that can be combined in compound statements with other
statements? I can only think of one case:
if(1)
foo: bar; // won't work if labels are leaf statements
Is there any more compelling reason behind this?