Computed goto

A computed goto is a goto statement for which the target is a label from the same function. The address of the label is a constant of type void*, and is obtained by applying the unary label value operator && to the label. The target of a computed goto is known at run time, and all computed goto statements from the same function will have the same targets. The language feature is an orthogonal extension to C99 and C++, implemented to facilitate porting programs developed with GNU C.

A computed goto is of the form

>>-goto--*expression--;----------------------------------------><
 
 

where *expression is an expression of type void*.

Related References

IBM Copyright 2003