diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-05-22 05:01:43 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-05-22 01:01:43 -0400 |
commit | 038fb86f047698c159302f913fbf2f1e8002dda2 (patch) | |
tree | 1b7f4b7b1d36f9e8ea9cff7f12707d7f51f1ff7f /gcc | |
parent | 82a7448c53924c93ecddda8d35cb4cbda824f10c (diff) | |
download | gcc-038fb86f047698c159302f913fbf2f1e8002dda2.zip gcc-038fb86f047698c159302f913fbf2f1e8002dda2.tar.gz gcc-038fb86f047698c159302f913fbf2f1e8002dda2.tar.bz2 |
* pt.c (print_template_context): Use fprintf instead of cp_error.
From-SVN: r19950
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/pt.c | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f0c33ea..128a932 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 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. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 437a85d..920e062 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. */ |