On 03/14/2016 10:57 PM, Jason Merrill wrote:
On 03/14/2016 05:30 PM, Florian Weimer wrote:
* Jason Merrill:

         P08184R0: Generalizing the Range-Based For Loop

How can one resolve this reference?  It's obviously not a PR number in
GCC Bugzilla.

I found this after some searching:

<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0184r0.html>

But it lacks the additional “8”.

Oops, typo.  Fixed, along with adjusting the feature-test macro.

If the change is limited to C++17, the adjusted macro should be as well.


commit f27fe6112b177226b112416457fa27be7cda394c
Author: Jason Merrill <ja...@redhat.com>
Date:   Tue Apr 19 15:13:42 2016 -0400

    	* c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.

diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 94523b8..408ad47 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

Reply via email to