The "undo_stepX()"'s pollute the CPU's cache, and (even much worse) the
gentle reader's.
> If the nesting gets any deeper than this, then a more
> understandable solution for readability than using goto would be to
> define a separate inline routine.
Can't be done (cleanly) in many cases due to function semantics in C,
polutes CPU cache as above, screws up or gives bad code due to compiler
bugs. Plus has the gentle reader who wants to check error handling chasing
all over the place.
> In general, I recommend using goto only when it is
> topologically necessary to avoid code duplication or due to some
> compiler quirk where you want to sqeeze a few more cycles out of code
> in a critical path. That way, the use of goto basically flags these
> unusual cases for other programmers.
IMVHO, any general criterion that is not strictly based on code
understandability, possibly mitigated by a justified need of maximal speed,
is flawed. This might come close, but won't cut it for me.
-- Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/