问题
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?
- Base case cmdline:
/O1 /EHsc /Wall /wd4571
- Test case cmdline:
/O1 /EHs /Wall /wd4571
回答1:
Ah, looks like Compiler Explorer sets the exception model itself, and this is taking precedence.
来源:https://stackoverflow.com/questions/59050839/why-is-visual-studio-on-compiler-explorer-ignoring-the-exception-model-setting