[cfe-dev] Clang for Windows and Boost

Óscar Fuentes ofv at wanadoo.es
Fri Mar 18 19:24:54 PDT 2011


John McCall <rjmccall-2kanFRK1NckAvxtiuMwx3w at public.gmane.org> writes:

> On Mar 18, 2011, at 5:41 PM, Ahmed Charles wrote:
>> Does clang built with MSVC support exceptions? Or is it such that
>> clang + windows = no eh support?
>
> IANAL, but the conventional wisdom is that Windows SEH cannot be
> implemented by arbitrary compilers because it is protected by
> U.S. Patent # 5,628,016, issued to Borland and presumably licensed
> by other compiler vendors.  Absent a generous grant of technology,
> we will not be able to support EH on Windows until that patent expires,
> which (again, IANAL) is on June 14th, 2014.

Structured Exception Handling != C++ exceptions.

You can exploit SEH for implementing C++ exceptions, but you can
implement C++ exceptions without SEH. MinGW supports C++ exceptions (two
models, no less) and did not support SEH last time I checked.

> If you only care about interoperability with mingw, it apparently doesn't
> work, but I don't really know what the issues are.

I guess that the missing pieces pertain to Clang's C++ runtime
libraries. Platform-specific bits. Or does Clang use the g++ libraries
for EH? If that's the case, we need to teach Clang how to use them for
MinGW/Dwarf (assuming that Clang has no support for SJLJ).



More information about the cfe-dev mailing list