summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-22 16:16:27 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-22 16:16:27 +0000
commit9c980ab58b4cc543565b7c0182998939fc9b7839 (patch)
tree507d30ca9a2fc0fe61e2e23454eb3cc98870994b
parent5352530896605643bb65227f180cf27e924e821e (diff)
downloadgcc-9c980ab58b4cc543565b7c0182998939fc9b7839.tar.gz
* c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235371 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c-cppbuiltin.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index fc772147ae8..085d16ab689 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,7 @@
+2016-04-22 Jason Merrill <jason@redhat.com>
+
+ * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
+
2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
PR c++/69363
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 94523b8fc7c..408ad4747a3 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -841,7 +841,8 @@ 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=201603");
+ if (cxx_dialect <= cxx14)
+ cpp_define (pfile, "__cpp_range_based_for=200907");
if (cxx_dialect <= cxx14)
cpp_define (pfile, "__cpp_static_assert=200410");
cpp_define (pfile, "__cpp_decltype=200707");
@@ -877,6 +878,7 @@ c_cpp_builtins (cpp_reader *pfile)
cpp_define (pfile, "__cpp_nested_namespace_definitions=201411");
cpp_define (pfile, "__cpp_fold_expressions=201603");
cpp_define (pfile, "__cpp_nontype_template_args=201411");
+ cpp_define (pfile, "__cpp_range_based_for=201603");
}
if (flag_concepts)
/* Use a value smaller than the 201507 specified in