Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 11/07/2023
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

Windows:

/Zc:arg

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 threadSafeInit default behavior, you should specify /Zc:threadSafeInit-.

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

/Zc setting name

Description

alignedNew[-]

Enables C++17 aligned allocation functions (default for C++17). Disabled by /Zc:alignedNew-.

char8_t[-]

Enables char8_t from C++2a. Disabled by /Zc:char8_t- (default).

cplusplus[-]

Enables the __cplusplus preprocessor macro to report the supported standard. Disabled by /Zc:cplusplus- (default).

dllexportInlines[-]

Enables dllexport/dllimport inline member functions of dllexport/import classes (default). Disabled by /Zc:dllexportInlines-.

sizedDealloc[-]

Enables C++14 sized global deallocation functions (default). Disabled by /Zc:sizedDealloc-

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-.

trigraphs[-]

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

twoPhase[-]

Enables two-phase name lookup in templates. Disabled by /Zc:twoPhase- (default).

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

Alternate Options

None