This is the mail archive of the cygwin mailing list for the Cygwin 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]

llvm/clang 3.0-1 silently ignores C++ exception handling


Clang++ 3.0-1 does not produce any exception handling code. Unwind tables and code within catch(.) {...} blocks are not generated. Throw always abort()s program.

$ cat trycatch.cc
void do_work();
void handle_error();

void func()
{
  try { do_work();  }
  catch (...) { handle_error(); }
}

$ clang++ -fexceptions -S trycatch.cc

$ grep handle_error trycatch.s

$ cat trycatch.s
...
__Z4funcv:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        calll   __Z7do_workv
        addl    $8, %esp
        popl    %ebp
        ret


$ g++ -S trycatch.cc


$ grep handle_error trycatch.s
        call    __Z12handle_errorv


Is this as excepted?


Christian


-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


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