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

ID 767253
Date 6/24/2024
Public
Document Table of Contents

std, Qstd

Tells the compiler to conform to a specific language standard.

Syntax

Linux:

-std=val

Windows:

/Qstd:val

/std:val (for Microsoft* compatibility)

Arguments

val

Specifies the language standard to conform to.

On Windows*, option /Qstd supports more values than option /std supports. Option /std complies with the values permitted by Microsoft option /std. For the latest information about Microsoft option/std, see the Microsoft documentation.

The following values can be specified for both Linux* and Windows*:

c++2b

Enables support for the Working Draft for ISO C++ 2023 DIS standard. On Windows, this setting is only supported for option /Qstd.

c++20

Enables support for the 2020 ISO C++ DIS standard.

c++17

Enables support for the 2017 ISO C++ standard with amendments.

c++14

Enables support for the 2014 ISO C++ standard with amendments.

c18 and c17

Both settings enable support for the 2017 ISO C standard. On Windows, setting c18 is only supported for option /Qstd.

Support for c17 can also be enabled by value iso9899:2017.

Support for c18 can also be enabled by value iso9899:2018.

c11

Enables support for the 2011 ISO C standard.

Support for this standard can also be enabled by value iso9899:2011.

The following value can be specified on Windows for option /std only:

c++latest

Enables all currently implemented compiler and standard library features proposed for the next draft standard, as well as some in-progress and experimental features. For further details, see the Microsoft documentation.

The following values can only be specified for Linux:

c++11

Enables support for the 2011 ISO C++ standard with amendments.

c++98 and c++03

Enables support for the 1998 ISO C++ standard with amendments.

c2x

Enables support for the Working Draft for ISO C2x standard.

c99

Enables support for the 1999 ISO C standard.

Support for this standard can also be enabled by value iso9899:1999.

c90 and c89

Enables support for the 1990 ISO C standard.

Support for this standard can also be enabled by value iso9899:1990.

gnu++2b

Enables support for the Working Draft for ISO C++ 2023 DIS standard plus GNU extensions.

gnu++20

Enables support for the 2020 ISO C++ DIS standard plus GNU extensions.

gnu++17

Enables support for the 2017 ISO C++ standard with amendments plus GNU extensions.

gnu++14

Enables support for the 2014 ISO C++ standard with amendments plus GNU extensions.

gnu++11

Enables support for the 2011 ISO C++ standard with amendments plus GNU extensions.

gnu++98 and gnu++03

Enables support for the 1998 ISO C++ standard with amendments plus GNU extensions.

gnu2x

Enables support for the Working Draft for ISO C2x standard plus GNU extensions.

gnu18 and gnu17

Enables support for the 2017 ISO C standard plus GNU extensions.

gnu11

Enables support for the 2011 ISO C standard plus GNU extensions.

gnu99

Enables support for the 1999 ISO C standard plus GNU extensions.

gnu90 and gnu89

Enables support for the 1990 ISO C standard plus GNU extensions.

Default

c++17 or c17

For C++, the compiler conforms to the 2017 ISO C++ standard.

For C, the compiler conforms to the 2017 ISO C standard.

Description

This option tells the compiler to conform to a specific language standard.

IDE Equivalent

Visual Studio: Language > C/C++ Language Support

Eclipse: Language > ANSI Conformance

Alternate Options

None