This documentation is archived and is not being maintained.

/Za, /Ze (Disable Language Extensions)


The Visual C++ compiler offers a number of features beyond those specified in either the ANSI C or ANSI C++ standards. These features are known collectively as Microsoft's extensions to C and C++. 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.

Option Description
/Za Language constructs not compatible with either ANSI C++ or ANSI C are flagged as errors.
/Ze 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- after /Za to disable /Op. For additional information, 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.

See /Zc for ways to get standard behavior with /Ze.

For more information about conformance issues with Visual C++, see Standard Compliance Issues in Visual C++.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the C/C++ folder.
  3. Click the Language property page.
  4. Modify the Disable Language Extensions property.

To set this compiler option programmatically

See DisableLanguageExtensions Property.

See Also

Compiler Options | Setting Compiler Options