From 941515205deb8586b79b3f02722d2d7a9532539f Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 7 Mar 2014 15:00:25 -0500 Subject: [PATCH] parser.c (cp_parser_using_declaration): Consume the semicolon after bare parameter pack error. * parser.c (cp_parser_using_declaration): Consume the semicolon after bare parameter pack error. From-SVN: r208413 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/parser.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f617c622fc1..aa8b9143a07 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2014-03-07 Jason Merrill + * parser.c (cp_parser_using_declaration): Consume the semicolon + after bare parameter pack error. + * cp-tree.h (REF_PARENTHESIZED_P): New. * semantics.c (force_paren_expr): Set it. * pt.c (do_auto_deduction): Check it. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 8bc1126e238..71a2a9ed1c5 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -16016,7 +16016,10 @@ cp_parser_using_declaration (cp_parser* parser, USING_DECL_TYPENAME_P (decl) = 1; if (check_for_bare_parameter_packs (decl)) - return false; + { + cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON); + return false; + } else /* Add it to the list of members in this class. */ finish_member_declaration (decl); @@ -16031,7 +16034,10 @@ cp_parser_using_declaration (cp_parser* parser, decl, NLE_NULL, token->location); else if (check_for_bare_parameter_packs (decl)) - return false; + { + cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON); + return false; + } else if (!at_namespace_scope_p ()) do_local_using_decl (decl, qscope, identifier); else