Georg Steffers writes: > Hi, > > i am working on a lib that should implement OO methods in C. I tried to > build up an exception system using longjmp and ran into a problem. I am > searching for an answer a month now and am actually not bit farther > than at the beginning. Actually i am not sure if it is an issue with > gcc or i did not understand correctly how longjmp should work. Perhaps > anyone here can help. > > The problem is that if i make two longjmp, the second returning to the > function that issued the first, than my stack seems to be corrupted (or > something similar) I made a more or less simple example that did not > use any other part of my the OO lib nor did any dynamic memory stuff, > just a few functions that demonstates the problem.
See ISO C, Section 7.13.2,1 Para 2 on Page 244, particularly footnote 210. Redirected to gcc-help. Andrew.