[ros-dev] Re: [ros-svn] [gdalsnes]18113:-reorderInsertXscendingOrder macro argument order and update uses

Ge van Geldorp gvg at reactos.com
Wed Sep 28 19:47:58 CEST 2005

> 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
BTW, the following code which looks perfectly acceptable won't compile
correctly with your definition:

if (somecondition)

I admit this is a bit contrived example, you don't need the "else".

Gé van Geldorp.

More information about the Ros-dev mailing list