I noticed that we weren't using cp_parser_trailing_type_id for the case
in a lambda, and I think we should.
Tested x86_64-pc-linux-gnu, applying to trunk.
commit 22888aa5a1ab02a32a53a360c857e9dc16ec5f49
Author: Jason Merrill <ja...@redhat.com>
Date: Sat Mar 16 13:56:43 2013 -0400
* parser.c (cp_parser_lambda_declarator_opt): Use
cp_parser_trailing_type_id.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index f4a4278..0222e90 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -8554,7 +8554,8 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr)
if (cp_lexer_next_token_is (parser->lexer, CPP_DEREF))
{
cp_lexer_consume_token (parser->lexer);
- LAMBDA_EXPR_RETURN_TYPE (lambda_expr) = cp_parser_type_id (parser);
+ LAMBDA_EXPR_RETURN_TYPE (lambda_expr)
+ = cp_parser_trailing_type_id (parser);
}
/* The function parameters must be in scope all the way until after the