This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/26219] longjmp dosn't work



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-02-14 03:51 -------
Can you try:
#include <setjmp.h>
jmp_buf jb_error;  
void jump(void){
        longjmp(jb_error,1);
}
void func1(void){
    return;
}
int main(void){
    if(setjmp(jb_error))
       return 0;
    func1();
    jump();
}

I am wondering if you are invoking undefined behavior in calling longjmp twice
on the same setjmp.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26219


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]