CFG: switch Statement

The CFG for an example switch statement is shown below. Note that there are multiple outgoing edges from the switch point and that each one (excepting the default edge) is uniquely labeled with an arbitrarily chosen label.

Example

switch (x){
    case 1:
    case 2:
        i = x;
        break;
    default:
        i = x + 1;
        break;
}
...
diagram: CFG for example code

Browse