-
Notifications
You must be signed in to change notification settings - Fork 120
/
c_standard_gcc8.txt
97 lines (77 loc) · 4.53 KB
/
c_standard_gcc8.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
-std=
Determine the language standard. This option is currently only supported when compiling C or C++.
The compiler can accept several base standards, such as c90 or c++98, and GNU dialects of those standards, such as gnu90 or gnu++98. When a base
standard is specified, the compiler accepts all programs following that standard plus those using GNU extensions that do not contradict it. For
example, -std=c90 turns off certain features of GCC that are incompatible with ISO C90, such as the "asm" and "typeof" keywords, but not other
GNU extensions that do not have a meaning in ISO C90, such as omitting the middle term of a "?:" expression. On the other hand, when a GNU
dialect of a standard is specified, all features supported by the compiler are enabled, even when those features change the meaning of the base
standard. As a result, some strict-conforming programs may be rejected. The particular standard is used by -Wpedantic to identify which
features are GNU extensions given that version of the standard. For example -std=gnu90 -Wpedantic warns about C++ style // comments, while
-std=gnu99 -Wpedantic does not.
A value for this option must be provided; possible values are
c90
c89
iso9899:1990
Support all ISO C90 programs (certain GNU extensions that conflict with ISO C90 are disabled). Same as -ansi for C code.
iso9899:199409
ISO C90 as modified in amendment 1.
c99
c9x
iso9899:1999
iso9899:199x
ISO C99. This standard is substantially completely supported, modulo bugs and floating-point issues (mainly but not entirely relating to
optional C99 features from Annexes F and G). See <http://gcc.gnu.org/c99status.html> for more information. The names c9x and iso9899:199x
are deprecated.
c11
c1x
iso9899:2011
ISO C11, the 2011 revision of the ISO C standard. This standard is substantially completely supported, modulo bugs, floating-point issues
(mainly but not entirely relating to optional C11 features from Annexes F and G) and the optional Annexes K (Bounds-checking interfaces) and
L (Analyzability). The name c1x is deprecated.
c17
c18
iso9899:2017
iso9899:2018
ISO C17, the 2017 revision of the ISO C standard (expected to be published in 2018). This standard is same as C11 except for corrections of
defects (all of which are also applied with -std=c11) and a new value of "__STDC_VERSION__", and so is supported to the same extent as C11.
gnu90
gnu89
GNU dialect of ISO C90 (including some C99 features).
gnu99
gnu9x
GNU dialect of ISO C99. The name gnu9x is deprecated.
gnu11
gnu1x
GNU dialect of ISO C11. The name gnu1x is deprecated.
gnu17
gnu18
GNU dialect of ISO C17. This is the default for C code.
c++98
c++03
The 1998 ISO C++ standard plus the 2003 technical corrigendum and some additional defect reports. Same as -ansi for C++ code.
gnu++98
gnu++03
GNU dialect of -std=c++98.
c++11
c++0x
The 2011 ISO C++ standard plus amendments. The name c++0x is deprecated.
gnu++11
gnu++0x
GNU dialect of -std=c++11. The name gnu++0x is deprecated.
c++14
c++1y
The 2014 ISO C++ standard plus amendments. The name c++1y is deprecated.
gnu++14
gnu++1y
GNU dialect of -std=c++14. This is the default for C++ code. The name gnu++1y is deprecated.
c++17
c++1z
The 2017 ISO C++ standard plus amendments. The name c++1z is deprecated.
gnu++17
gnu++1z
GNU dialect of -std=c++17. The name gnu++1z is deprecated.
c++2a
The next revision of the ISO C++ standard, tentatively planned for 2020. Support is highly experimental, and will almost certainly change in
incompatible ways in future releases.
gnu++2a
GNU dialect of -std=c++2a. Support is highly experimental, and will almost certainly change in incompatible ways in future releases.