From: Gunnar Dalsnes
Oh, so goto's are acceptable if and only if
you hide them
out of sight?
No, i think gotos are ok internally but i dont like them for return.
First set a retval and then goto to the end. ugh...ly.
The definition of your RETURN():
#define RETURN(value) { _ret_ = value; goto _cleanup_; }
which seems to set a retval and then does a goto to the end. So, again,
"ugly code" (your words, not mine) is acceptable if you hide it out of
sight?
BTW, the following code which looks perfectly acceptable won't compile
correctly with your definition:
if (somecondition)
RETURN(errorcode);
else
do_something_else();
I admit this is a bit contrived example, you don't need the "else".
Gé van Geldorp.