aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-11-16 22:23:30 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2017-11-16 22:23:30 +0000
commit1e39313ac00c633263dfd11e06b782c9d988cad8 (patch)
treefb24110c6c1d839a3552ced475422f5d12218223 /gcc/doc
parent727bd12ea30debe9c17958508858960d5fa3d2b9 (diff)
downloadgcc-1e39313ac00c633263dfd11e06b782c9d988cad8.zip
gcc-1e39313ac00c633263dfd11e06b782c9d988cad8.tar.gz
gcc-1e39313ac00c633263dfd11e06b782c9d988cad8.tar.bz2
Add -std=c18 etc. option aliases.
ISO C17 won't go to ballot until December, meaning publication of the standard won't be until 2018, leaving ambiguity as to whether people will end up referring to the standard as C17, as it's currently known and which corresponds to the __STDC_VERSION__ value, or C18 based on the publication date. In case people end up referring to this standard as C18, this patch adds corresponding option aliases -std=c18, -std=iso9899:2018, -std=gnu18 so people can use those names based on publication date if they wish. The "expected to be" explanations in help texts and the manual can be removed as and when the standard is published, hopefully before GCC 8 is out. Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * doc/invoke.texi (-std=c17): Refer to 2018 expected publication date of C17. (-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases. gcc/c-family: * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018 expected publication date of C17. (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases. gcc/testsuite: * gcc.dg/c18-version-1.c, gcc.dg/c18-version-2.c: New tests. From-SVN: r254847
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6384bc6..1e2b869 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1832,8 +1832,11 @@ Annexes F and G) and the optional Annexes K (Bounds-checking
interfaces) and L (Analyzability). The name @samp{c1x} is deprecated.
@item c17
+@itemx c18
@itemx iso9899:2017
-ISO C17, the 2017 revision of the ISO C standard. This standard is
+@itemx 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 @option{-std=c11}) and a new value of
@code{__STDC_VERSION__}, and so is supported to the same extent as C11.
@@ -1852,6 +1855,7 @@ GNU dialect of ISO C11.
The name @samp{gnu1x} is deprecated.
@item gnu17
+@itemx gnu18
GNU dialect of ISO C17. This is the default for C code.
@item c++98