[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB Polygon code (with r-tree speedups) triggers GCC bug...



> setjmp / longjmp is being used to short-circuit the return of a
> recursive r-tree search call, so is required. It can just be a little
> mind-bendy to get your head around the execution flow, and potential
> side-effects (which is what bit me).
>
> The linux man page has this to say:
>
> "setjmp() and sigsetjmp() make programs hard to understand and maintain.
>  If possible an alternative should be used."
>
> Well, I think in PCB at least some of their use is quite justified, even
> if in places it is a nightmare to follow the execution flow.
> Fortunately, the "worst" use of these functions is contained in the
> polygon handling routines, and IIRC for error trapping / shortcut
> returns in the DRC code.
>   
OK - but to help those who follow in your keystrokes, copy your first 
sentence as a comment in the code at setjmp() and the line that calls 
the jump.  Sometimes a gun is just the tool you need...  ;)


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user