This is the mail archive of the
mailing list for the GCC project.
Re: [C++ Patch] PR 58503
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Jason Merrill <jason at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 04 Oct 2013 01:42:02 +0200
- Subject: Re: [C++ Patch] PR 58503
- Authentication-results: sourceware.org; auth=none
- References: <524D3E46 dot 2070101 at oracle dot com> <524D70BD dot 90103 at redhat dot com>
On 10/03/2013 03:27 PM, Jason Merrill wrote:
On 10/03/2013 05:52 AM, Paolo Carlini wrote:
+ else if (!TREE_TYPE (*begin) || !TREE_TYPE (*end))
This should use type_dependent_expression_p.
And there should be a positive test for a dependent range that
exercises this code.
I see what you mean. But I'm not sure that positive test can really
exist (that is, a positive test exercising the new code).
My point is that do_range_for_auto_deduction is called only by
cp_parser_range_for and *only* when type_dependent_expression_p is
*false* for the range_expr. Now, is it possible that in a range-based
for-statement with such a range_expr, begin_expr and end_expr are
At the moment I can't see how, given the various options in C++11, also
summarized in the comment before cp_convert_range_for. Thus it seems to
me that we are dealing with very specific forms of type-dependency that
can occur only in invalid code. What do you think?