Not tested, but since longjmp has __attribute__ ((noreturn)), it should.
ah, 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).
If 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.