diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 16f5a4e..1400424 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11748,14 +11748,20 @@ cp_parser_using_declaration (cp_parser* parser, { /* Create the USING_DECL. */ decl = do_class_using_decl (parser->scope, identifier); - /* Add it to the list of members in this class. */ - finish_member_declaration (decl); + + if (check_for_bare_parameter_packs (&decl)) + return false; + else + /* Add it to the list of members in this class. */ + finish_member_declaration (decl); } else { decl = cp_parser_lookup_name_simple (parser, identifier); if (decl == error_mark_node) cp_parser_name_lookup_error (parser, identifier, decl, NULL); + else if (check_for_bare_parameter_packs (&decl)) + return false; else if (!at_namespace_scope_p ()) do_local_using_decl (decl, qscope, identifier); else @@ -15263,11 +15269,13 @@ cp_parser_base_clause (cp_parser* parser) if (pack_expansion_p) /* Make this a pack expansion type. */ TREE_VALUE (base) = make_pack_expansion (TREE_VALUE (base)); - else - check_for_bare_parameter_packs (&TREE_VALUE (base)); + - TREE_CHAIN (base) = bases; - bases = base; + if (!check_for_bare_parameter_packs (&TREE_VALUE (base))) + { + TREE_CHAIN (base) = bases; + bases = base; + } } /* Peek at the next token. */ token = cp_lexer_peek_token (parser->lexer); |