PR c++/29138
* decl2.c (grokfield): Don't handle access declarations here.
* parser.c (cp_parser_using_declaration): Handle access
declarations too.
(cp_parser_block_declaration): Adjust calls to
cp_parser_using_declaration.
(cp_parser_member_declaration): Likewise. Use
cp_parser_using_declaration to look for access_declarations.
PR c++/29138
* g++.dg/inherit/access8.C: New test.
* g++.dg/template/dtor4.C: Tweak error messages.
From-SVN: r117411
{
/* Grab the nested-name-specifier and continue the loop. */
cp_parser_pre_parsed_nested_name_specifier (parser);
+ if (is_declaration
+ && TREE_CODE (parser->scope) == TYPENAME_TYPE)
+ parser->scope = resolve_typename_type (parser->scope,
+ /*only_current_p=*/false);
success = true;
continue;
}