aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-05-14 20:37:48 +0000
committerJason Merrill <jason@redhat.com>2013-05-14 20:37:48 +0000
commitcaee89cb71aa6f1388563555584318d6b349ae49 (patch)
tree219735b3d46dbdadd18b7816167299c8f3480947 /gcc/cp
parent2268df4a55c92e367c81c930068eb8c477275b96 (diff)
PR c++/57243
* parser.c (cp_parser_range_for): Call complete_type. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@198902 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/parser.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index eedc6bb30f3..52b69e0b2a7 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2013-05-14 Jason Merrill <jason@redhat.com>
+ PR c++/57243
+ * parser.c (cp_parser_range_for): Call complete_type.
+
PR c++/57041
* pt.c (tsubst_copy_and_build): Don't recur into a designator.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index abc49b69f2c..50b3e22396c 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -9598,7 +9598,7 @@ cp_parser_range_for (cp_parser *parser, tree scope, tree init, tree range_decl)
if (range_expr != error_mark_node
&& !type_dependent_expression_p (range_expr)
/* The length of an array might be dependent. */
- && COMPLETE_TYPE_P (TREE_TYPE (range_expr))
+ && COMPLETE_TYPE_P (complete_type (TREE_TYPE (range_expr)))
/* do_auto_deduction doesn't mess with template init-lists. */
&& !BRACE_ENCLOSED_INITIALIZER_P (range_expr))
do_range_for_auto_deduction (range_decl, range_expr);