[LLVMdev] Windows EH support

Reid Kleckner rnk at google.com
Fri Dec 19 11:35:15 PST 2014


On Fri, Dec 19, 2014 at 1:48 AM, Dennis Luehring <dl.soluz at gmx.net> wrote:
>
> is the cl feature "SEH-Exceptions as C++-Exceptions" (compile switch /EHa)
> also on your list?
>

A faithful implementation of /EHa is out of scope. We would have to emit EH
cleanups for code like this:

struct A { ~A(); };
int foo(int *p) {
  A a;
  return *p; // Make sure to run ~A() if *p faults!
}

LLVM and Clang still believe that *calls* are the only potentially
exceptional operations. Loads, stores, division, etc are still UB if they
trap.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141219/f6b82705/attachment.html>


More information about the llvm-dev mailing list