[cfe-dev] clang-cl, _HAS_EXCEPTIONS, and Microsoft

Edward Diener 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++ 
(http://connect.microsoft.com/VisualStudio/feedback/details/811347/compiling-vc-12-0-with-has-exceptions-0-and-including-concrt-h-causes-a-compiler-error):

"Hello,
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 mailing list