http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039
Bug ID: 59039 Summary: Undocumented __builtin_longjmp/__builtin_setjmp Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com cilk_fiber-unix.cpp has #pragma GCC push_options #pragma GCC optimize ("-O0") NORETURN cilk_fiber_sysdep::run() { It fails when compiled with any optimization. This function has __builtin_setjmp and __builtin_longjmp within the same function. When __builtin_longjmp is put in a separate function, optimization works. But there is no documentation on how __builtin_longjmp and __builtin_setjmp should be used, like the jump buffer size and fields as well as any limitation. If it is true that __builtin_setjmp and __builtin_longjmp can't be used within the same function, GCC should issue an error, at least a warning.