/Za, /Ze (Disable Language Extensions)

The /Za compiler option emits an error for language constructs that are not compatible with either ANSI C or ANSI C++. The /Ze compiler option, which is the default, enables Microsoft extensions.




The /Ze option is deprecated.

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 extensions to C and C++. These extensions are available when the /Ze optionĀ is specified, and not available when the /Za option is specified. See Microsoft Extensions to C and C++ for more information.

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.

Other compiler options used with /Za can affect how the compiler ensures ANSI conformance. For example, /Za and /fp (Specify Floating-Point Behavior) may result in unexpected behavior.

See the /Zc compiler option for ways to get standard behavior with /Za.

For more information about conformance issues with Visual C++, see Compatibility and 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 How to: Open Project Property Pages.

  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 Also


Compiler Options

Setting Compiler Options