This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/59039] New: Undocumented __builtin_longjmp/__builtin_setjmp
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 07 Nov 2013 12:50:40 +0000
- Subject: [Bug other/59039] New: Undocumented __builtin_longjmp/__builtin_setjmp
- Auto-submitted: auto-generated
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.