You copied the Doc URL to your clipboard.

-std

Specifies the language standard to compile for.

Syntax

-std=name

Where:

name

Specifies the language mode. Valid values include:

c90
C as defined by the 1990 C standard.
gnu90
C as defined by the 1990 C standard, with additional GNU extensions.
c99
C as defined by the 1999 C standard.
gnu99
C as defined by the 1999 C standard, with additional GNU extensions.
c11
C as defined by the 2011 C standard.
gnu11
C as defined by the 2011 C standard, with additional GNU extensions.
c++98
C++ as defined by the 1998 standard.
gnu++98
C++ as defined by the 1998 standard, with additional GNU extensions.
c++11
C++ as defined by the 2011 standard.
gnu++11
C++ as defined by the 2011 standard, with additional GNU extensions.

For C++ code, the default is gnu++98. For more information about C++ support, see C++ Status on the Clang web site.

For C code, the default is gnu11. For more information about C support, see Language Compatibility on the Clang web site.

Related reference

Related information

Was this page helpful? Yes No