本文介绍了为什么在Compiler Explorer上的Visual Studio忽略“异常模型"设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 Compiler Explorer测试用例中使用/EHs标志时,(启用通过extern "C"函数传递的异常),VC ++ 19.22似乎忽略了它,因为它仍然会踢出C5039而不实际更改代码.

When I try to use the /EHs flag in a Compiler Explorer testcase (to "enable" exceptions passing through extern "C" functions), VC++ 19.22 seems to be ignoring it, based on it still kicking out a C5039 and not actually changing the code.

我想念什么?我忘记了其他开关吗?

What am I missing? Have I forgotten another switch or something?

  • 基本案例cmdline:/O1 /EHsc /Wall /wd4571
  • 测试用例cmdline:/O1 /EHs /Wall /wd4571
  • Base case cmdline: /O1 /EHsc /Wall /wd4571
  • Test case cmdline: /O1 /EHs /Wall /wd4571

推荐答案

嗯,看起来Compiler Explorer设置了异常模型本身,并且它具有优先权.

Ah, looks like Compiler Explorer sets the exception model itself, and this is taking precedence.

这篇关于为什么在Compiler Explorer上的Visual Studio忽略“异常模型"设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 08:51