/Za, /Ze (Disable Language Extensions)
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

/Za, /Ze (Disable Language Extensions)

/Za flags language constructs not compatible with either ANSI C++ or ANSI C as errors. /Ze enables Microsoft 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 extensions to C and C++. These extensions are available when the /Ze option, the default, is specified and are not available when the s 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 s can how the compiler ensures ANSI conformance. For example, s and /fp (Specify Floating-Point Behavior) may result in unexpected behavior.

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

/Ze is deprecated in Visual C++ 2005; it is the default. For more information, see Deprecated Compiler Options.

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

© 2016 Microsoft