std, Qstd

Tells the compiler to conform to a specific language standard.

Syntax

Linux OS and OS X:

-std=val

Windows OS:

/Qstd=val

Arguments

val

Specifies the specific language standard to conform to. Possible values are:

c89

Conforms to the ISO/IEC 9899:1990 International Standard. This value is only available on Linux* OS and OS X*.

c99

Conforms to The ISO/IEC 9899:1999 International Standard.

c9x

This value is equivalent to specifying value c99. This value is only available on Linux* OS and OS X*.

gnu89

Conforms to ISO C90 plus GNU* extensions. This value is only available on Linux* OS and OS X*.

gnu99

Conforms to ISO C99 plus GNU* extensions. This value is only available on Linux* OS and OS X*.

gnu++98

Conforms to the 1998 ISO C++ standard plus GNU extensions. This value is only available on Linux* OS and OS X*.

c++11

Enables support for many C++11 (formerly known as C++0x) features. The following are the most recently added features:

  • Defining move special member functions (N3053)

  • Explicit virtual overrides (N2928,N3206,N3272)

  • Full implementation of constexpr (this feature is only available on Linux* OS and OS X*)

  • Full implementation of initializer lists

  • Full implementation of noexcept

  • Full implementation of non static data members (i.e. field initializers)

  • Raw string literals and UTF-8 literals

  • Delegating constructors

  • Ref-qualifiers on member functions

  • Additional type trait helpers (for example, __is_nothrow_assignable, __is_trivially_assignable, __is_trivially_constructible, __bases, __direct_bases, etc.)

For a list of C++11 features that were previously implemented by the Intel® C++ Compiler, see the article titled C++11 Features Supported by Intel® C++ Compiler, which is located in http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/

c++0x

This value is equivalent to specifying value c++11.

gnu++0x

This value is equivalent to specifying value c++0x. This value is only available on Linux* OS and OS X*.

Default

-std=gnu89 (default for C)

Conforms to ISO C90 plus GNU extensions.

-std=gnu++98 (default for C++)

Conforms to the 1998 ISO C++ standard plus GNU* extensions.

/Qstd

OFF. Note that a subset of C++11 features is enabled by default for compatibility with a particular version of Microsoft Visual Studio* C++, so you only need to specify /Qstd=c++0x if you want additional C++11 functionality beyond what Microsoft provides.

Description

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

On Windows* OS, you can only specify values c99 and c++0x.

IDE Equivalent

Windows: Language > Enable C++0x Support

Language > Enable C99 Support

Linux: Language > ANSI Conformance

OS X: Language > C Language Dialect and C++ Language Dialect

Alternate Options

None

For more complete information about compiler optimizations, see our Optimization Notice.