Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Zc

Lets you specify ANSI C standard conformance for certain language features.

Syntax

Linux:

None

macOS:

None

Windows:

/Zc:arg1[,arg2]

Arguments

arg

Is the language feature for which you want standard conformance.

The settings are compatible with Microsoft* settings for option /Zc. For a list of supported settings, see the table in the Description section of this topic.

Default

varies

See the table in the Description section of this topic.

Description

This option lets you specify ANSI C standard conformance for certain language features.

If you do not want the default behavior for one or more of the settings, you must specify the negative form of the setting. For example, if you do not want the forScope or wchar_t default behavior, you should specify /Zc:forScope-,wchar_t-.

The following table shows the supported Microsoft settings for option /Zc.

/Zc setting name

Description

auto[-]

Enforces compliance to the new standard meaning for auto (default). Disabled by /Zc:auto-.

forScope[-]

Enforces standard compliance in for-loop scope (default). Disabled by /Zc:forScope-.

inline[-]

Controls inline expansion. Disabled by /Zc:inline- (default).

rvalueCast[-]

Enforces Standard C++ explicit type conversion rules. Disabled by /Zc:rvalueCast- (default).

strictStrings[-]

Enforces const qualification for string literals. Disabled by /Zc:strictStrings- (default).

threadSafeInit[-]

Enables thread-safe initialization of local statics (default). Disabled by /Zc:threadSafeInit-.

throwingNew[-]

Enables link with the operator new implementation. Disabled by /Zc:throwingNew- (default).

trigraphs[-]

Enables trigraph character sequences. Disabled by /Zc:trigraphs- (default).

wchar_t[-]

Specifies that wchar_t is a native data type (default). Disabled by /Zc:wchar_t-.

IDE Equivalent

Visual Studio: Language > Treat wchar_t as Built-in Type / Force Conformance In For Loop Scope

Language > Enforce type conversion rules (rvalueCast)

Eclipse: None

Xcode: None

Alternate Options

None