aaron.ballman added a reviewer: rsmith.
aaron.ballman added a comment.

In https://reviews.llvm.org/D38209#880553, @STL_MSFT wrote:

> > 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.


That might be helpful. I'm mostly interested in whether `__declspec(nothrow)` 
is intended to be part of the type system in the same way `noexcept` specifiers 
are.

@erichkeane -- can you see whether `__attribute__((nothrow))` is part of the 
type system as far as GCC is concerned (in C++17 mode, assuming GCC has 
implemented that functionality already)?


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