* pt.c (print_template_context): Use fprintf instead of cp_error.
authorJason Merrill <jason@yorick.cygnus.com>
Fri, 22 May 1998 05:01:43 +0000 (05:01 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 22 May 1998 05:01:43 +0000 (01:01 -0400)
From-SVN: r19950

gcc/cp/ChangeLog
gcc/cp/pt.c

index f0c33eae545b1453148b531b03409008aff2d4a2..128a93229e9feb776f54361de3386777df2f747a 100644 (file)
@@ -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.
index 437a85d622ae7d86b3a9e6871dd3f3b8191099d3..920e0622fa7bf0a872cda71adbe1cc5617f40adf 100644 (file)
@@ -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.  */