aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2013-10-08 21:58:58 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-10-08 21:58:58 +0000
commitc80217c9fabc7bdcba6e098a4903a0d357333b8d (patch)
tree4023b4c69f0f5ea622a899f879c7cade5bafc152 /gcc/cp/lambda.c
parenta330ff7f5c68964b62c691649560ae2f19430a8f (diff)
downloadgcc-c80217c9fabc7bdcba6e098a4903a0d357333b8d.zip
gcc-c80217c9fabc7bdcba6e098a4903a0d357333b8d.tar.gz
gcc-c80217c9fabc7bdcba6e098a4903a0d357333b8d.tar.bz2
re PR c++/58568 ([c++11] ICE with lambda in invalid template variable definition)
/cp 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58568 * lambda.c (begin_lambda_type): Check return value of xref_tag for error_mark_node; tidy. * decl.c (grokdeclarator): Tweak error message. /testsuite 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58568 * g++.dg/cpp0x/lambda/lambda-ice10.C: New. * g++.old-deja/g++.mike/misc9.C: Adjust. From-SVN: r203289
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 2ffa7e0..2ecb17c 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -138,6 +138,8 @@ begin_lambda_type (tree lambda)
name,
/*scope=*/ts_lambda,
/*template_header_p=*/false);
+ if (type == error_mark_node)
+ return error_mark_node;
}
/* Designate it as a struct so that we can use aggregate initialization. */
@@ -152,8 +154,6 @@ begin_lambda_type (tree lambda)
/* Start the class. */
type = begin_class_definition (type);
- if (type == error_mark_node)
- return error_mark_node;
return type;
}