* parser.c (cp_parser_perform_range_for_lookup): Decay the array.
From-SVN: r235370
This commit is contained in:
committed by
Jason Merrill
parent
e7e12d92e3
commit
76f9244ed0
@@ -1,3 +1,7 @@
|
||||
2016-04-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* parser.c (cp_parser_perform_range_for_lookup): Decay the array.
|
||||
|
||||
2016-04-21 Patrick Palka <ppalka@gcc.gnu.org>
|
||||
|
||||
* name-lookup.c (free_saved_scope): New free list of saved_scope
|
||||
|
||||
+2
-2
@@ -11413,12 +11413,12 @@ cp_parser_perform_range_for_lookup (tree range, tree *begin, tree *end)
|
||||
if (TREE_CODE (TREE_TYPE (range)) == ARRAY_TYPE)
|
||||
{
|
||||
/* If RANGE is an array, we will use pointer arithmetic. */
|
||||
*begin = range;
|
||||
*begin = decay_conversion (range, tf_warning_or_error);
|
||||
*end = build_binary_op (input_location, PLUS_EXPR,
|
||||
range,
|
||||
array_type_nelts_top (TREE_TYPE (range)),
|
||||
0);
|
||||
return build_pointer_type (TREE_TYPE (TREE_TYPE (range)));
|
||||
return TREE_TYPE (*begin);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user