10-12-2013, 04:59 PM
Rule 15.3 states, "For the purposes of this rule, a switch-clause that does not consist of a compound statement is treated as if it were a block." What if the switch-clause did not end in an unconditional "break;"? While I understand such code would violate other rule(s), the point raised remains: would the following code violate this rule?
Code:
...
switch( a )
{
case 1:
if( f(a) > 8 )
goto b;
doingSomething();
case 2:
doingSomeOtherThing();
b:
tada( a );
break;
default:
break;
}
...