Closed Quuxplusone closed 12 years ago
Bugzilla Link | PR1124 |
Status | RESOLVED WONTFIX |
Importance | P normal |
Reported by | Reid Spencer (rspencer@reidspencer.com) |
Reported on | 2007-01-19 19:15:41 -0800 |
Last modified on | 2012-03-26 05:57:07 -0700 |
Version | 1.0 |
Hardware | All All |
CC | anton@korobeynikov.info, benny.kra@gmail.com, edwin+bugs@etorok.eu, evan.cheng@apple.com, llvm-bugs@lists.llvm.org |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
CBE turns the program's definition of __sigsetjmp into this:
struct l_struct_2E___jmp_buf_tag {
unsigned int field0[6];
unsigned int field1;
struct l_struct_2E___sigset_t field2;
};
unsigned int __sigsetjmp(struct l_struct_2E___jmp_buf_tag *, unsigned int );
The setjmp.h function defines it this way:
typedef struct __jmp_buf_tag /* C++ doesn't like tagless structs. */
{
/* NOTE: The machine-dependent definitions of `__sigsetjmp'
assume that a `jmp_buf' begins with a `__jmp_buf' and that
`__mask_was_saved' follows it. Do not move these members
or add others before it. */
__jmp_buf __jmpbuf; /* Calling environment. */
int __mask_was_saved; /* Saved the signal mask? */
__sigset_t __saved_mask; /* Saved signal mask. */
} jmp_buf[1];
extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROW;
This also occurs on darwin/x86.
Maybe we should do the opposite? Include setjmp.h and just don't emit
declarations for sigsetjmp and friends?
You are then at the mercy of the contents of setjmp.h which can vary widely
across platforms. We need to invoke any setjmp/longjmp the way it was defined in
the headers of the compiled source program, not in the headers of the system
compiling the CBE output.
IOW, we need to inject our use of setjmp, etc. *as if* setjmp.h had been
#included in the source.
This still occurs.
_Bug 2858 has been marked as a duplicate of this bug._
The C backend was removed from svn trunk and is no longer maintained. Closing the bug.