aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-12-12 11:43:16 -0500
committerJason Merrill <jason@gcc.gnu.org>2014-12-12 11:43:16 -0500
commit18e780d460928cdbcd78b1dcbaf2bda9b8d0537c (patch)
treefc93cb696974d6d6f9a464daaf1235e8c443c3ea /gcc/cp/lambda.c
parent0f3d27f01a5d86b3f7a9323d2b7fe1aa11f6ad2b (diff)
downloadgcc-18e780d460928cdbcd78b1dcbaf2bda9b8d0537c.zip
gcc-18e780d460928cdbcd78b1dcbaf2bda9b8d0537c.tar.gz
gcc-18e780d460928cdbcd78b1dcbaf2bda9b8d0537c.tar.bz2
re PR c++/61402 (-Wsequence-point doesn't notice unsequenced lambda init and function argument)
PR c++/61402 * lambda.c (add_capture): Don't pass a dependent type to variably_modified_type_p. From-SVN: r218680
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 9eb9200..3da28e5 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -483,7 +483,8 @@ add_capture (tree lambda, tree id, tree orig_init, bool by_reference_p,
NULL_TREE, array_type_nelts (type));
type = vla_capture_type (type);
}
- else if (variably_modified_type_p (type, NULL_TREE))
+ else if (!dependent_type_p (type)
+ && variably_modified_type_p (type, NULL_TREE))
{
error ("capture of variable-size type %qT that is not an N3639 array "
"of runtime bound", type);