]> granicus.if.org Git - clang/commitdiff
Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17.
authorAaron Ballman <aaron@aaronballman.com>
Fri, 8 Dec 2017 02:39:26 +0000 (02:39 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 8 Dec 2017 02:39:26 +0000 (02:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320131 91177308-0d34-0410-b5e6-96231b3b80d8

test/Preprocessor/c17.c [new file with mode: 0644]

diff --git a/test/Preprocessor/c17.c b/test/Preprocessor/c17.c
new file mode 100644 (file)
index 0000000..c610e84
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c17 %s
+// expected-no-diagnostics
+
+_Static_assert(__STDC_VERSION__ == 201710L, "Incorrect __STDC_VERSION__");