std, Qstd

Tells the compiler to conform to a specific language standard.

IDE Equivalent

Windows: Language > Enable C++0x Support

Language > Enable C99 Support

Linux: Language > ANSI Conformance

Mac OS X: Language > C ANSI Conformance

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-std=val

Windows:

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

c99

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

c9x

This value is equivalent to specifying value c99.

gnu89

Conforms to ISO C90 plus GNU* extensions.

gnu99

Conforms to ISO C99 plus GNU* extensions.

gnu++98

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

c++0x

Enables support for the following C++0x features:

  • Atomic types and operations

  • Scoped enumeration types

  • Defaulted and deleted functions

  • Rvalue references

  • Empty macro arguments

  • Variadic macros

  • Type long long

  • Trailing comma in enum definition

  • Concatenation of mixed-width string literals

  • Extended friend declarations

  • Use of ">>" to close two template argument lists

  • Relaxed rules for use of "typename"

  • Relaxed rules for disambiguation using the "template" keyword

  • "extern template" to suppress instantiation of an entity

  • "auto" type specifier

  • decltype operator

  • static_assert

  • compliant __func__

  • lambda expressions

  • character types char16_t and char32_t to store UTF-16 and UTF-32 encoding values, respectively

  • template aliases

  • variadic templates

  • nullptr

  • late-specified return types as defined in gcc proposal N2541

  • default template arguments for function templates

  • standard attributes as defined in gcc proposal N2761

  • new style SFINAE as defined in gcc proposal N2634

gnu++0x

This value is equivalent to specifying value c++0x.

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

The default is compatible with your version of Microsoft Visual Studio* C++ .

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.

Alternate Options

None


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.