From: Jason Merrill Date: Fri, 22 May 1998 05:01:43 +0000 (+0000) Subject: * pt.c (print_template_context): Use fprintf instead of cp_error. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=038fb86f047698c159302f913fbf2f1e8002dda2;p=gcc.git * pt.c (print_template_context): Use fprintf instead of cp_error. From-SVN: r19950 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f0c33eae545..128a93229e9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 1998-05-22 Jason Merrill + * 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. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 437a85d622a..920e0622fa7 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3346,14 +3346,15 @@ print_template_context (err) 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; } } @@ -3361,14 +3362,12 @@ print_template_context (err) 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. */