It's not specific to Linux or gcc; setjmp / longjmp and C++ don't work too well together if you're using longjmp to leave a context where there are automatic variables with destructors.
The destructors won't run which may result in a memory leak or other bad behaviour.