# std, Qstd

Tells the compiler to conform to a specific language standard.

## Syntax

Linux: | -std=val

macOS: | -std=val

Windows: | /Qstd:val

## Arguments

val | Specifies the specific language standard to conform to. Possible values are:
c++2b | Enables support for the Working Draft for ISO C++ 2023 DIS standard.
gnu++2b | Enables support for the Working Draft for ISO C++ 2023 DIS standard plus GNU extensions.
c++20 | Enables support for the 2020 ISO C++ DIS standard.
gnu++20 | Enables support for the 2020 ISO C++ DIS standard plus GNU extensions.
c++17 | Enables support for the 2017 ISO C++ standard with amendments.
gnu++17 | Enables support for the 2017 ISO C++ standard with amendments plus GNU extensions.
c++14 | Enables support for the 2014 ISO C++ standard with amendments.
gnu++14 | Enables support for the 2014 ISO C++ standard with amendments plus GNU extensions.
c++11 | Enables support for the 2011 ISO C++ standard with amendments.
gnu++11 | Enables support for the 2011 ISO C++ standard with amendments plus GNU extensions.
c++0x | Enables support for the 2011 ISO C++ standard.
gnu++0x | Enables support for the 2011 ISO C++ standard plus GNU extensions.
c++98 and c++03 | Enables support for the 1998 ISO C++ standard with amendments.
gnu++98 and gnu++03 | Enables support for the 1998 ISO C++ standard with amendments plus GNU extensions.
c2x | Enables support for the Working Draft for ISO C2x standard.
gnu2x | Enables support for the Working Draft for ISO C2x standard plus GNU extensions.
c18 and c17 | Enables support for the 2017 ISO C standard. Support for c17 can also be enabled by value iso9899:2017. Support for c18 can also be enabled by value iso9899:2018.
gnu18 and gnu17 | Enables support for the 2017 ISO C standard plus GNU extensions.
c11 | Enables support for the 2011 ISO C standard. Support for this standard can also be enabled by value iso9899:2011.
gnu11 | Enables support for the 2011 ISO C standard plus GNU extensions.
c99 | Enables support for the 1999 ISO C standard. Support for this standard can also be enabled by value iso9899:1999.
gnu99 | Enables support for the 1999 ISO C standard plus GNU extensions.
c90 and c89 | Enables support for the 1990 ISO C standard. Support for this standard can also be enabled by value iso9899:1990.
gnu90 and gnu89 | Enables support for the 1990 ISO C standard plus GNU extensions.

## Default

Default for C: -std=gnu89 | Enables support for the 1990 ISO C standard plus GNU extensions.
Default for C++: -std=gnu++98 | Enables support for the 1998 ISO C++ standard with amendments plus GNU extensions.
Default for Windows: | 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* systems, you can only specify values c99 and c++0x.

## IDE Equivalent

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

Eclipse: Language > ANSI Conformance

Xcode: Language > C Language Dialect and C++ Language Dialect

## Alternate Options

None

Parent topic: Language Options