+2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
+
+ * error.c (dump_template_parameter): Use parm to determine how
+ to print default value.
+
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
* class.c (duplicate_tag_error): Clear more flags.
if ((flags & TFF_FUNCTION_DEFAULT_ARGUMENTS) && a != NULL_TREE)
{
output_add_string (scratch_buffer, " = ");
- if (TREE_CODE (a) == TYPE_DECL || TREE_CODE (a) == TEMPLATE_DECL)
+ if (TREE_CODE (p) == TYPE_DECL || TREE_CODE (p) == TEMPLATE_DECL)
dump_type (a, flags & ~TFF_CHASE_TYPEDEF);
else
dump_expr (a, flags | TFF_EXPR_IN_PARENS);
+2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old_deja/g++.pt/error3.C: New test.
+
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
* g++.old_deja/g++.other/crash39.C: New test.
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 10 Jan 2001 <nathan@codesourcery.com>
+
+// Bug 1606. We sorry'd issuing an error.
+
+struct A {};
+template <class T = A> class Tpl {};
+
+struct B {
+ Tpl<int> s;
+};
+
+void foo (B *ptr)
+{
+ ptr->Tpl.t (); // ERROR - template as expression
+}