diff options
author | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-10-03 18:39:32 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-10-03 18:39:32 +0000 |
commit | 547e3b2a6380d009559c2d9960334d36d9c13be9 (patch) | |
tree | e39951ea5f759ad77d26ae6631f987c5aec3299a /gcc | |
parent | 981114e175b2702448171adf1448f9daacb56921 (diff) | |
download | gcc-547e3b2a6380d009559c2d9960334d36d9c13be9.zip gcc-547e3b2a6380d009559c2d9960334d36d9c13be9.tar.gz gcc-547e3b2a6380d009559c2d9960334d36d9c13be9.tar.bz2 |
re PR c++/29138 (access declarations don't work for classes)
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index cb2346a..05151cd 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3632,6 +3632,10 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, { /* 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; } |