diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2003-09-07 10:11:28 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2003-09-07 10:11:28 +0000 |
commit | dba65e798f980af13231c931f418d6e35d61eedd (patch) | |
tree | cf1ec8b78316a2d95e298530826a3c04d994ca76 /gcc/diagnostic.c | |
parent | 687f4bc133ed1a3f22d225def43de34ebf5d9873 (diff) | |
download | gcc-dba65e798f980af13231c931f418d6e35d61eedd.zip gcc-dba65e798f980af13231c931f418d6e35d61eedd.tar.gz gcc-dba65e798f980af13231c931f418d6e35d61eedd.tar.bz2 |
langhooks.c (lhd_print_error_function): Move from diagnostic.c.
* langhooks.c (lhd_print_error_function): Move from diagnostic.c.
* Makefile.in (langhooks.o): Depend on diagnostic.h
From-SVN: r71165
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 8d01a2b..8c8a86c 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -279,40 +279,6 @@ diagnostic_action_after_output (diagnostic_context *context, } } -/* The default function to print out name of current function that caused - an error. */ -void -lhd_print_error_function (diagnostic_context *context, const char *file) -{ - if (diagnostic_last_function_changed (context)) - { - const char *old_prefix = context->printer->prefix; - char *new_prefix = file ? build_message_string ("%s: ", file) : NULL; - - pp_set_prefix (context->printer, new_prefix); - - if (current_function_decl == NULL) - pp_string (context->printer, _("At top level:")); - else - { - if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE) - pp_printf - (context->printer, "In member function `%s':", - (*lang_hooks.decl_printable_name) (current_function_decl, 2)); - else - pp_printf - (context->printer, "In function `%s':", - (*lang_hooks.decl_printable_name) (current_function_decl, 2)); - } - pp_newline (context->printer); - - diagnostic_set_last_function (context); - pp_flush (context->printer); - context->printer->prefix = old_prefix; - free ((char*) new_prefix); - } -} - /* Prints out, if necessary, the name of the current function that caused an error. Called from all error and warning functions. We ignore the FILE parameter, as it cannot be relied upon. */ |