Thanks Robster
I use a toolchain by bobintrees that was on Mr.Mirkos site about 6 months back or so, even before I got my GP. The version I have must use newlib then? It definately has setjmp and longjmp.
I compiled pnglib, which uses setjmp and longjmp to as a 'goto' to jump back to a specific part of code when an error occurs (goto: naughty naughty). All was fine and dandy until this happened (longjmp was called). After it happened once, the code would not continue to run. It didn't crash, but sort of froze or something. Perhaps infinately looping the longjmp?
I have since gone through the whole source for pnglib and replaced all functions that called png_error with custom code to set and pass back abn error variable - which was a LOT of work, and it seems to have fixed the problem. However, I may have introduced memory leaks by doing this, by jumping out of a function before freeing a struct or something. It is unlikely though, because in most instances I simply replaced 'png_error' calls with my own exit code, so the original would have had the leak too
However, the long and short of it is, that if I could get it to work with the original setJmp and longJmp, it would be better because I would feel better about using orginal code
Maybe it is something else (not an error, but an ARM oddity) that makes setjmp work funny? It screws up the LCD sometimes too