[cfe-dev] clang-cl, _HAS_EXCEPTIONS, and Microsoft
eldlistmailingz at tropicsoft.com
Wed Jan 8 07:36:38 PST 2014
Here is the latest response from Microsoft to my bug report regarding
_HAS_EXCEPTIONS being set to 0 when compiling with VC++
Thank you for reporting.
Macro _HAS_EXCEPTIONS=0 is undocumented and unsupported by Microsoft.
It may work with some parts of the STL library for legacy reasons, but
it won't be compatible with ConcRT library (concrt.h) since ConcRT
depends on exceptions for cancellation."
The same bug also occurs when compiling with clang-cl. In other words
the clang-cl need to have exception handling and give up on the idea
that clang-cl can be implemented successfully with _HAS_EXCEPTIONS being
set to 0. BTW the concrt.h is being included in Microsoft headers
automatically no matter whether _HAS_EXCEPTIONS is set to 0 or not, but
I think this is a non-issue from Microsoft's statement above that
_HAS_EXCEPTIONS is undocumented and unsupported.
More information about the cfe-dev