STL_MSFT added a comment.

> do you think `__declspec(nothrow)` calling the terminate handler in Clang is 
> a bug?

It's certainly a behavior difference with potential performance impact, 
although I don't think it can be viewed as a bug, strictly speaking. MSVC 
treats `__declspec(nothrow)` as an optimization request, with undefined 
behavior if it's violated. Termination is definitely one of the possible 
results of undefined behavior.

We've recently had to slightly rethink our EH strategy in light of C++17's 
addition of noexcept into the type system, and the removal of dynamic exception 
specifications (and the change in semantics to throw()). MSVC's /EHsc makes 
this extra fun. If you're interested, I can put you in contact with the 
compiler dev who recently made those changes.


https://reviews.llvm.org/D38209



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to