]> granicus.if.org Git - clang/commit
Add language standard aliases for -std=c18, -std=gnu18, and -std=iso9899:2018.
authorAaron Ballman <aaron@aaronballman.com>
Thu, 18 Oct 2018 17:42:41 +0000 (17:42 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 18 Oct 2018 17:42:41 +0000 (17:42 +0000)
commit8ed09f041057b6671e0944fbb5b386e10bf8eaeb
tree7da09781917eb9806a789f863d16c3de686c949f
parent972f7e6fe5e2c6fdd583f90f149c87de11676c5f
Add language standard aliases for -std=c18, -std=gnu18, and -std=iso9899:2018.

As described in D40225, the C17 standard was balloted and approved in 2017, but the ISO publication process delayed the actual publication until 2018. WG14 considers the release to be C17 and describes it as such, but users can still be confused by the publication year which is why -std=c18 adds value. These aliases map to c17 and are all supported by GCC 8.x with the same behavior. Note that the value of __STDC_VERSION__ remains at 201710L.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344749 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Frontend/LangStandards.def
test/Driver/unknown-std.c
test/Preprocessor/c17.c