码迷,mamicode.com
首页 > 其他好文 > 详细

/EH (Exception Handling Model)

时间:2016-06-16 09:16:52      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:

Specifies the kind of exception handling used by the compiler, when to optimize away exception checks, and whether to destroy C++ objects that go out of scope because of an exception. If /EH is not specified, the compiler catches both asynchronous structured exceptions and C++ exceptions, but does not destroy C++ objects that go out of scope because of an asynchronous exception.

/EH{s|a}[c][r][-]

a

The exception-handling model that catches both asynchronous (structured) and synchronous (C++) exceptions.

s

The exception-handling model that catches C++ exceptions only and tells the compiler to assume that functions declared as extern "C"may throw an exception.

c

If used with s (/EHsc), catches C++ exceptions only and tells the compiler to assume that functions declared as extern "C" never throw a C++ exception.

/EHca is equivalent to /EHa.

r

Tells the compiler to always generate runtime termination checks for all noexcept functions. By default, runtime checks for noexcept may be optimized away if the compiler determines the function calls only non-throwing functions.

 

 

more details:

https://msdn.microsoft.com/en-us/library/1deeycx5.aspx

/EH (Exception Handling Model)

标签:

原文地址:http://www.cnblogs.com/majunlichn/p/5589796.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!