[PATCH] D40225: Add -std=c17 as a flag
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 19 09:19:55 PST 2017
aaron.ballman created this revision.
GCC currently supports the flags -std=c17, -std=gnu17, and -std=iso9899:2017, with the only functional difference with C11 being the value of __STDC_VERSION__. These flags are documented at: https://gcc.gnu.org/onlinedocs/gcc/Standards.html
This patch adds these flags and updates __STDC_VERSION__ based on the C17 FDIS. Note that C17 is going out for balloting in December. I spoke with the GCC maintainer for the flags about what they will do when C17 is published in 2018 and their plan is to add c18, iso9899:2018, and gnu18. I will add the additional flags to Clang when the C17 ballot succeeds.
https://reviews.llvm.org/D40225
Files:
include/clang/Basic/LangOptions.def
include/clang/Frontend/LangStandard.h
include/clang/Frontend/LangStandards.def
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/InitPreprocessor.cpp
test/Driver/unknown-std.c
test/Preprocessor/c17.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40225.123502.patch
Type: text/x-patch
Size: 4558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171119/e8f5384b/attachment.bin>
More information about the cfe-commits
mailing list