From 7cb32822701d0ce49aae361f576c9c9dc31bb2f3 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 31 Mar 2002 22:32:05 +0000 Subject: diagnostic.c (print_error_function): Remove. * diagnostic.c (print_error_function): Remove. (default_print_error_function): Rename. (report_error_function): Update. * diagnostic.h (print_error_function): Remove. (default_print_error_function): Remove. * langhooks-def.h (struct diagnostic_context): Predeclare. (lhd_print_error_function, LANG_HOOKS_PRINT_ERROR_FUNCTION): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct diagnostic context): Predeclare. (struct lang_hooks): New hook. cp: * Make-lang.in (error.o): Update. * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. * cp-tree.h (struct diagnostic_context): Predeclare. (cxx_print_error_function): New. * error.c: Include langhooks-def.h. (lang_print_error_function): Rename. Update. (init_error): Don't set hook. f: * com.c (lang_print_error_function): Rename. (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. (ffe_init): Don't set hook. java: * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. (java_dummy_print): Remove. (lang_print_error): Rename. Exit early if inhibiting output. (inhibit_error_printing_function): New. (java_init): Don't set hook. (lang_init_source): Use new boolean. From-SVN: r51672 --- gcc/diagnostic.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gcc/diagnostic.c') diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 7cb9c9b..15a614e 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -113,12 +113,6 @@ static tree last_error_function = NULL; /* Used to detect when input_file_stack has changed since last described. */ static int last_error_tick; -/* Called by report_error_function to print out function name. - Default may be overridden by language front-ends. */ - -void (*print_error_function) PARAMS ((diagnostic_context *, const char *)) - = default_print_error_function; - /* Prevent recursion into the error handler. */ static int diagnostic_lock; @@ -1087,7 +1081,7 @@ announce_function (decl) an error. */ void -default_print_error_function (context, file) +lhd_print_error_function (context, file) diagnostic_context *context; const char *file; { @@ -1130,7 +1124,7 @@ report_error_function (file) const char *file ATTRIBUTE_UNUSED; { report_problematic_module ((output_buffer *) global_dc); - (*print_error_function) (global_dc, input_filename); + (*lang_hooks.print_error_function) (global_dc, input_filename); } void -- cgit v1.1