This is the mail archive of the
cygwin
mailing list for the Cygwin project.
llvm/clang 3.0-1 silently ignores C++ exception handling
- From: Christian Franke <Christian dot Franke at t-online dot de>
- To: cygwin at cygwin dot com
- Date: Tue, 31 Jan 2012 19:41:52 +0100
- Subject: 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