Commit 038fb86f by Jason Merrill Committed by Jason Merrill

* pt.c (print_template_context): Use fprintf instead of cp_error.

From-SVN: r19950
parent 82a7448c
1998-05-22 Jason Merrill <jason@yorick.cygnus.com> 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. * pt.c (determine_specialization): Just return an error_mark_node.
Also print the decl we want in error messages. If we complain, Also print the decl we want in error messages. If we complain,
return error_mark_node. return error_mark_node.
......
...@@ -3346,14 +3346,15 @@ print_template_context (err) ...@@ -3346,14 +3346,15 @@ print_template_context (err)
if (current_function_decl == p->decl) if (current_function_decl == p->decl)
/* Avoid redundancy with the the "In function" line. */; /* Avoid redundancy with the the "In function" line. */;
else if (current_function_decl == NULL_TREE) 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 else
my_friendly_abort (980521); my_friendly_abort (980521);
if (p) if (p)
{ {
lineno = p->line; line = p->line;
input_filename = p->file; file = p->file;
p = p->next; p = p->next;
} }
} }
...@@ -3361,14 +3362,12 @@ print_template_context (err) ...@@ -3361,14 +3362,12 @@ print_template_context (err)
next: next:
for (; p; p = p->next) for (; p; p = p->next)
{ {
cp_error (" instantiated from `%D'", p->decl); fprintf (stderr, "%s:%d: instantiated from `%s'\n", file, line,
lineno = p->line; decl_as_string (p->decl, 0));
input_filename = p->file; line = p->line;
file = p->file;
} }
error (" instantiated from here"); fprintf (stderr, "%s:%d: instantiated from here\n", file, line);
lineno = line;
input_filename = file;
} }
/* Called from cp_thing to print the template context for an error. */ /* Called from cp_thing to print the template context for an error. */
......
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