std, Qstd

Tells the compiler to conform to a specific language standard.

IDE Equivalent

Windows (/Qstd=c++0x): C/C++ > Language > Enable C++0x Support

Linux: Language > ANSI Conformance

Architectures

IA-32 architecture, Intel® 64 architecture, IA-64 architecture

Syntax

Linux and Mac OS: -std=val
Windows:    /Qstd=val

Arguments

val      Possible values are:

 

c89 - Conforms to the ISO/IEC 9899:1990 International Standard.
  c99 - Conforms to The ISO/IEC 9899:1999 International Standard.
  gnu89 (Linux and Mac OS only) - Conforms to ISO C90 plus GNU* extensions.
  gnu++98 (Linux and Mac OS only) - Conforms to the 1998 ISO C++ standard plus GNU extensions.
  c++0x - Enable support for the following C++0x features:
  • 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"

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=c89 Conforms to the ISO/IEC 9899:1990 International Standard.

Description

Tells the compiler to conform to a specific language standard.

Alternate Options

None