+2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/11076
+ * class.c (handle_using_decl): Swap arguments of error_not_base_type.
+ * parser.c (cp_parser_direct_declarator): Only resolve typename for
+ namespace scope declarations.
+
2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12698, c++/12699, c++/12700, c++/12566
binfo = lookup_base (t, ctype, ba_any, NULL);
if (! binfo)
{
- error_not_base_type (t, ctype);
+ error_not_base_type (ctype, t);
return;
}
if (declarator == error_mark_node)
break;
- if (TREE_CODE (declarator) == SCOPE_REF)
+ if (TREE_CODE (declarator) == SCOPE_REF
+ && !current_scope ())
{
tree scope = TREE_OPERAND (declarator, 0);
+2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/11076
+ * g++.dg/template/crash13.C: New test.
+
2003-10-24 Joseph S. Myers <jsm@polyomino.org.uk>
* gcc.dg/c99-restrict-2.c: New test.
--- /dev/null
+// { dg-do compile }
+
+// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
+
+// PR c++/11076: ICE for invalid access declaration containing typename.
+
+template<typename, typename T=void> struct A
+{
+ typedef A<T,T> B;
+};
+
+template <typename T> struct C
+{ // { dg-error "not a base type" }
+ typedef typename A<T>::B X;
+ X::Y;
+};
+
+C<void> c; // { dg-error "instantiated" }