1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
+ * pt.c (print_template_context): Use fprintf instead of cp_error.
+
* pt.c (determine_specialization): Just return an error_mark_node.
Also print the decl we want in error messages. If we complain,
return error_mark_node.
if (current_function_decl == p->decl)
/* Avoid redundancy with the the "In function" line. */;
else if (current_function_decl == NULL_TREE)
- cp_error ("In instantiation of `%D':", p->decl);
+ fprintf (stderr, "In instantiation of `%s':\n",
+ decl_as_string (p->decl, 0));
else
my_friendly_abort (980521);
if (p)
{
- lineno = p->line;
- input_filename = p->file;
+ line = p->line;
+ file = p->file;
p = p->next;
}
}
next:
for (; p; p = p->next)
{
- cp_error (" instantiated from `%D'", p->decl);
- lineno = p->line;
- input_filename = p->file;
+ fprintf (stderr, "%s:%d: instantiated from `%s'\n", file, line,
+ decl_as_string (p->decl, 0));
+ line = p->line;
+ file = p->file;
}
- error (" instantiated from here");
-
- lineno = line;
- input_filename = file;
+ fprintf (stderr, "%s:%d: instantiated from here\n", file, line);
}
/* Called from cp_thing to print the template context for an error. */