re PR c++/51464 ([c++0x] ICE with invalid use of [])
/cp 2011-12-13 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51464 * semantics.c (begin_lambda_type): Check begin_class_definition return value for error_mark_node. * parser.c (cp_parser_lambda_expression): Check begin_lambda_type return value for error_mark_node. /testsuite 2011-12-13 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51464 * g++.dg/cpp0x/lambda/lambda-ice6.C: New. From-SVN: r182320
This commit is contained in:
parent
639166b250
commit
6fdc547369
@ -1,3 +1,11 @@
|
||||
2011-12-13 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51464
|
||||
* semantics.c (begin_lambda_type): Check begin_class_definition return
|
||||
value for error_mark_node.
|
||||
* parser.c (cp_parser_lambda_expression): Check begin_lambda_type
|
||||
return value for error_mark_node.
|
||||
|
||||
2011-12-13 Fabien Chêne <fabien@gcc.gnu.org>
|
||||
|
||||
PR c++/14258
|
||||
|
@ -8033,6 +8033,8 @@ cp_parser_lambda_expression (cp_parser* parser)
|
||||
cp_parser_lambda_introducer (parser, lambda_expr);
|
||||
|
||||
type = begin_lambda_type (lambda_expr);
|
||||
if (type == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
record_lambda_scope (lambda_expr);
|
||||
|
||||
|
@ -8623,6 +8623,8 @@ begin_lambda_type (tree lambda)
|
||||
|
||||
/* Start the class. */
|
||||
type = begin_class_definition (type, /*attributes=*/NULL_TREE);
|
||||
if (type == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
/* Cross-reference the expression and the type. */
|
||||
LAMBDA_EXPR_CLOSURE (lambda) = type;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-12-13 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51464
|
||||
* g++.dg/cpp0x/lambda/lambda-ice6.C: New.
|
||||
|
||||
2011-12-13 Andrew Pinski <apinski@cavium.com>
|
||||
Adam Nemet <anemet@caviumnetworks.com>
|
||||
|
||||
|
4
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice6.C
Normal file
4
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice6.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/51464
|
||||
// { dg-options "-std=c++0x" }
|
||||
|
||||
template<int = sizeof([])> struct A {}; // { dg-error "lambda" }
|
Loading…
Reference in New Issue
Block a user