mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 00:51:00 +08:00
re PR c++/59482 (A friend class cannot inherit a private nested class)
/cp 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com> PR c++/59482 * parser.c (cp_parser_class_head): Push the class before parsing the base-clause, pop after it. /testsuite 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com> PR c++/59482 * g++.dg/pr59482.C: New. From-SVN: r206933
This commit is contained in:
parent
1bb9990010
commit
32ab58b2a0
@ -1,3 +1,9 @@
|
||||
2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
|
||||
|
||||
PR c++/59482
|
||||
* parser.c (cp_parser_class_head): Push the class before parsing
|
||||
the base-clause, pop after it.
|
||||
|
||||
2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* decl2.c (cpp_check): Revert prototype change.
|
||||
|
@ -19845,7 +19845,17 @@ cp_parser_class_head (cp_parser* parser,
|
||||
|
||||
/* Get the list of base-classes, if there is one. */
|
||||
if (cp_lexer_next_token_is (parser->lexer, CPP_COLON))
|
||||
bases = cp_parser_base_clause (parser);
|
||||
{
|
||||
/* PR59482: enter the class scope so that base-specifiers are looked
|
||||
up correctly */
|
||||
if (type)
|
||||
pushclass (type);
|
||||
bases = cp_parser_base_clause (parser);
|
||||
/* PR59482: get out of the previously pushed class scope so that the
|
||||
subsequent pops pop the right thing */
|
||||
if (type)
|
||||
popclass ();
|
||||
}
|
||||
else
|
||||
bases = NULL_TREE;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
|
||||
|
||||
PR c++/59482
|
||||
* g++.dg/pr59482.C: New.
|
||||
|
||||
2014-01-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
|
||||
|
||||
* gcc.dg/vmx/insert-vsx-be-order.c: New.
|
||||
|
7
gcc/testsuite/g++.dg/pr59482.C
Normal file
7
gcc/testsuite/g++.dg/pr59482.C
Normal file
@ -0,0 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
class aa {
|
||||
friend class cc;
|
||||
class bb {};
|
||||
};
|
||||
|
||||
class cc : aa::bb {};
|
Loading…
x
Reference in New Issue
Block a user