/GX (Enable Exception Handling)
The latest version of this topic can be found at -GX (Enable Exception Handling).
Deprecated. Enables synchronous exception handling using the assumption that functions declared by using extern "C"
never throw an exception.
Syntax
/GX
Remarks
/GX is deprecated. Use the equivalent /EHsc option instead. For a list of deprecated compiler options, see the Deprecated and Removed Compiler Options section in Compiler Options Listed by Category.
By default, /EHsc, the equivalent of /GX, is in effect when you compile by using the Visual Studio development environment. When using the command line tools, no exception handling is specified. This is the equivalent of /GX-.
For more information, see C++ Exception Handling.
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.
In the navigation pane, choose Configuration Properties, C/C++, Command Line.
Type the compiler option in the Additional Options box.
To set this compiler option programmatically
- See AdditionalOptions.
See Also
Compiler Options
Setting Compiler Options
/EH (Exception Handling Model)