Add -std=c18 etc. option aliases.
commit88a136ba6ba755596641fd695bfa9c7424bbe7b5
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Nov 2017 22:23:30 +0000 (16 22:23 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Nov 2017 22:23:30 +0000 (16 22:23 +0000)
treefb24110c6c1d839a3552ced475422f5d12218223
parent9dd1f9ef60d80542bf5ee2caa4e35b1a760d6b5d
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254847 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c18-version-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c18-version-2.c [new file with mode: 0644]