17 ms·
Does it work with longjmp?
by aidenn0 12y ago
Does it work with longjmp?
- Snaipe 12y agoNot tested, but since longjmp has __attribute__ ((noreturn)), it should.
- aidenn0 12y agoah, it uses function attributes to do that; nice. [edit] What about: fn A calls setjmp, calls... ...fn B allocates, calls... ...fn C which may or may not longjmp (so not marked noreturn).
- Snaipe 12y agoIf a function may or may not return, and it is not marked for inlining, even gcc cannot infer whenever the variable exits the scope, so no. You have to be extra careful anyways when using context switches.