From: Jakub Jelinek Date: Wed, 20 Sep 2017 19:35:36 +0000 (+0200) Subject: cplusplus.C: Test that __cplusplus is equal to 201703L. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fb3cd39dcfcecf8e9bc605bd3fe3ee74c8407b90;p=gcc.git cplusplus.C: Test that __cplusplus is equal to 201703L. * g++.dg/cpp1z/cplusplus.C: Test that __cplusplus is equal to 201703L. * g++.dg/cpp1z/cplusplus_1z.C: New test. From-SVN: r253029 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8d44116db01..7caf07a5617 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-20 Jakub Jelinek + + * 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 * gcc.target/i386/builtin_target.c: Test knm. diff --git a/gcc/testsuite/g++.dg/cpp1z/cplusplus.C b/gcc/testsuite/g++.dg/cpp1z/cplusplus.C index 0d0ac141c77..bc6139b2e86 100644 --- a/gcc/testsuite/g++.dg/cpp1z/cplusplus.C +++ b/gcc/testsuite/g++.dg/cpp1z/cplusplus.C @@ -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 index 00000000000..aecbc1e9bc8 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/cplusplus_1z.C @@ -0,0 +1,6 @@ +// { dg-do compile } +// { dg-options "-std=c++1z" } + +#if __cplusplus != 201703L +#error "__cplusplus != 201703L" +#endif