Search code examples
cgccgoto

When do we use goto *expr; in C?


| GOTO '*' expr ';'

I've never see such statements yet,anyone can bring an example?


Solution

  • IIRC that's a GNU-ism for tail calls. Normally you'd leave that optimization to the compiler, but it can be useful when writing kernels or embedded device drivers.