summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/semantics.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index bd82693722c..3be2f1e715d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/57408
+ * semantics.c (add_capture): Set type to error_mark_node after
+ error.
+
2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/57640
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 0a460a42544..4c76b80d0cd 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -9521,6 +9521,7 @@ add_capture (tree lambda, tree id, tree initializer, bool by_reference_p,
&& variably_modified_type_p (TREE_TYPE (type), NULL_TREE))
inform (input_location, "because the array element type %qT has "
"variable size", TREE_TYPE (type));
+ type = error_mark_node;
}
else if (by_reference_p)
{