/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
+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.
/* 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;
+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.
--- /dev/null
+/* { dg-do compile } */
+class aa {
+ friend class cc;
+ class bb {};
+};
+
+class cc : aa::bb {};