Commit 31bb3027 by Nathan Sidwell Committed by Nathan Sidwell

error.c (dump_template_parameter): Use parm to determine how to print default value.

cp:
	* error.c (dump_template_parameter): Use parm to determine how
	to print default value.
testsuite:
	* g++.old_deja/g++.pt/error3.C: New test.

From-SVN: r38869
parent c0c102a9
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.
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
......
......@@ -336,7 +336,7 @@ dump_template_parameter (parm, 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.
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
......
// 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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment