aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-03-28 13:22:49 -0400
committerJason Merrill <jason@gcc.gnu.org>2016-03-28 13:22:49 -0400
commit322b8466d2afccbb0a30cd5c1e1ead1575f0bbc6 (patch)
treef1706e5aa528a2e98a923caab890f9713a6337ba
parent6f6d25c9e901a7fbb0e51b9b8dd532bb49b6933f (diff)
downloadgcc-322b8466d2afccbb0a30cd5c1e1ead1575f0bbc6.zip
gcc-322b8466d2afccbb0a30cd5c1e1ead1575f0bbc6.tar.gz
gcc-322b8466d2afccbb0a30cd5c1e1ead1575f0bbc6.tar.bz2
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
From-SVN: r234508
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c-cppbuiltin.c2
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C4
5 files changed, 11 insertions, 7 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index c1188d7..26b1dab 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,7 @@
+2016-03-28 Jason Merrill <jason@redhat.com>
+
+ * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
+
2016-03-23 Marek Polacek <polacek@redhat.com>
PR c++/69884
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index ee953ca..94523b8 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -841,7 +841,7 @@ c_cpp_builtins (cpp_reader *pfile)
cpp_define (pfile, "__cpp_lambdas=200907");
if (cxx_dialect == cxx11)
cpp_define (pfile, "__cpp_constexpr=200704");
- cpp_define (pfile, "__cpp_range_based_for=200907");
+ cpp_define (pfile, "__cpp_range_based_for=201603");
if (cxx_dialect <= cxx14)
cpp_define (pfile, "__cpp_static_assert=200410");
cpp_define (pfile, "__cpp_decltype=200707");
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
index 67f75a7..397b9a8 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
@@ -55,8 +55,8 @@
#ifndef __cpp_range_based_for
# error "__cpp_range_based_for"
-#elif __cpp_range_based_for != 200907
-# error "__cpp_range_based_for != 200907"
+#elif __cpp_range_based_for < 200907
+# error "__cpp_range_based_for < 200907"
#endif
#ifndef __cpp_static_assert
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
index d9dbf62..fa59f90 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
@@ -48,8 +48,8 @@
#ifndef __cpp_range_based_for
# error "__cpp_range_based_for"
-#elif __cpp_range_based_for != 200907
-# error "__cpp_range_based_for != 200907"
+#elif __cpp_range_based_for < 200907
+# error "__cpp_range_based_for < 200907"
#endif
#ifndef __cpp_static_assert
diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
index 3dc358f..74c6f29 100644
--- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
+++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
@@ -42,8 +42,8 @@
#ifndef __cpp_range_based_for
# error "__cpp_range_based_for"
-#elif __cpp_range_based_for != 200907
-# error "__cpp_range_based_for != 200907"
+#elif __cpp_range_based_for != 201603
+# error "__cpp_range_based_for != 201603"
#endif
#ifndef __cpp_decltype