/Za /Ze
The Visual C++ compiler offers a number of features beyond those specified in either the ANSI C or ANSI C++ standards. These features are collectively known as Microsoft’s extensions to the C and C++ languages. These extensions are available when the /Ze option, the default, is specified and are not available when the /Za option is specified. See Microsoft Extensions to C and C++ for more information.
Command line | Project settings | Description |
---|---|---|
/Za | Disable Language Extensions (check box selected) | Language constructs not compatible with either ANSI C++ or ANSI C are flagged as errors. |
/Ze | (Check box cleared) | Enables Microsoft extensions. |
Note If you use the Disable Language Extensions (/Za) option, the Improve Float Consistency (/Op) option is used to improve the consistency of floating-point tests for equality and inequality. This use of /Op with /Za is for strict ANSI conformance and is the only situation under which /Op is selected by default. The /Op– option is provided to override the default selection of /Op with /Za. Specify /Op– in the Common/Project/Source File Options text box (or on the command line), after /Za, to disable /Op. For more information, also see Generate Intrinsic Functions (/Oi).
Disable language extensions if you plan to port your program to other environments. The compiler treats extended keywords as simple identifiers, disables the other Microsoft extensions, and automatically defines the __STDC__ predefined macro for C programs.
Compiler Options | Setting Compiler Options