cplusplus.C: Test that __cplusplus is equal to 201703L.
authorJakub Jelinek <jakub@redhat.com>
Wed, 20 Sep 2017 19:35:36 +0000 (21:35 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 20 Sep 2017 19:35:36 +0000 (21:35 +0200)
* g++.dg/cpp1z/cplusplus.C: Test that __cplusplus is equal to 201703L.
* g++.dg/cpp1z/cplusplus_1z.C: New test.

From-SVN: r253029

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/cplusplus.C
gcc/testsuite/g++.dg/cpp1z/cplusplus_1z.C [new file with mode: 0644]

index 8d44116db01fa4357754c28910cade0b3b5e0333..7caf07a5617b818bd487ef61cd2c0502f9d644e1 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-20  Jakub Jelinek  <jakub@redhat.com>
+
+       * g++.dg/cpp1z/cplusplus.C: Test that __cplusplus is equal to 201703L.
+       * g++.dg/cpp1z/cplusplus_1z.C: New test.
+
 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
 
        * gcc.target/i386/builtin_target.c: Test knm.
index 0d0ac141c77e2eb91bc369f21d2bdc5303491c31..bc6139b2e86bcb2e2ebaba028130e9029e00d8c3 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-std=c++17" }
 
-#if __cplusplus <= 201402L
-#error "__cplusplus <= 201402L"
+#if __cplusplus != 201703L
+#error "__cplusplus != 201703L"
 #endif
diff --git a/gcc/testsuite/g++.dg/cpp1z/cplusplus_1z.C b/gcc/testsuite/g++.dg/cpp1z/cplusplus_1z.C
new file mode 100644 (file)
index 0000000..aecbc1e
--- /dev/null
@@ -0,0 +1,6 @@
+// { dg-do compile }
+// { dg-options "-std=c++1z" }
+
+#if __cplusplus != 201703L
+#error "__cplusplus != 201703L"
+#endif