search for: unwind_resume_or_rethrow

Displaying 4 results from an estimated 4 matches for "unwind_resume_or_rethrow".

2010 Jul 12
3
[LLVMdev] clang/g++ frontend: can __cxa_end_catch throw?
...vm-gcc didn't optimize the > code as well as it might, since the invoke is redundant. > But there are cases when the outcomes will be different. In case of gcc frontend terminate() will be called when the original exception's destructor throws an exception and in case of clang Unwind_Resume_or_Rethrow will be called which is different. I think one of these cases must be an incorrect behavior. Yuri
2010 Jul 12
2
[LLVMdev] clang/g++ frontend: can __cxa_end_catch throw?
When I compile a piece of C++ with exceptions into .ll I see that gcc frontend in some cases calls __cxa_end_catch with 'call' and in other cases with 'invoke' with termination in case of exception. clang++ always just calls __cxa_end_catch with 'call' instruction. Which way is correct? --- c.cpp --- #include <stdio.h> #include <stdlib.h> struct C {
2010 Jul 12
0
[LLVMdev] clang/g++ frontend: can __cxa_end_catch throw?
Hi Yuri, > When I compile a piece of C++ with exceptions into .ll I see that gcc > frontend in some cases calls __cxa_end_catch with 'call' and in other > cases with 'invoke' with termination in case of exception. clang++ > always just calls __cxa_end_catch with 'call' instruction. IIRC, __cxa_end_catch may throw an exception because it runs the destructor for
2010 Jul 12
0
[LLVMdev] clang/g++ frontend: can __cxa_end_catch throw?
...>> code as well as it might, since the invoke is redundant. >> > > But there are cases when the outcomes will be different. In case of gcc > frontend terminate() will be called when the original exception's > destructor throws an exception and in case of clang > Unwind_Resume_or_Rethrow will be called which is different. > > I think one of these cases must be an incorrect behavior. For your test case, clang++'s code is correct (and better) because __cxa_end_catch won't throw for a caught exception of that type. That said, clang++'s code is incorrect in general...