------- Comment #1 from cm1 at mumac dot de 2010-07-15 09:15 ------- Sorry, I edited the contents of the precompiler output to make it more readable and messed up the auto variable name. Please use this code:
#include <stdlib.h> #include <stdio.h> #include <setjmp.h> #define EXC_TRY 1 #define EXC_CATCH 2 func() { const char *p = NULL; /*** auto variable ***/ { jmp_buf exc_jmp_buf; int exc_state; if (setjmp(exc_jmp_buf) == 0) { /*** setjmp() ***/ exc_state = EXC_TRY; } else { exc_state = EXC_CATCH; } if (exc_state == EXC_TRY) { /*** TRY BLOCK ***/ p = "some value"; } if (exc_state == EXC_CATCH) { /*** CATCH BLOCK ***/ puts(p); } } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44947