This is the mail archive of the gcc@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]

Re: try/finally in GNU C


On Jun 15, 2006, at 4:47 PM, Andrew Pinski wrote:
The front-end in question has stopped working because the traditional
setjmp/longjmp translation of try/catch constructs is no longer
working correctly with versions of GCC higher than 4.0.

How is it no longer working? I don't understand how it could break.

I can. Just do up the simplest use of __builtin_setjmp and __builtin_longjmp and you'll see that there are no control flow edges. People totally broke C++ on non-dw2 systems?! This also caused warnings for variables that should be marked volatile that are homed in registers that cross the boundary to not give the `can be clobbered' warning. If there were an edge, it would be put in a register and then the warning kicks in. Without the edge, ssa `knows' the variable doesn't change:


foo() {
  int i = 99;
  __builtin_setjmp(A)
  if (i) {
    print i
    --i;
    __builtin_longjump(A);
  }

It used to not infinite loop, now it does.


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