aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-03-31 22:32:05 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-03-31 22:32:05 +0000
commit7cb32822701d0ce49aae361f576c9c9dc31bb2f3 (patch)
tree095a8c71baa85e6ccb7e9e788b0e115460d44314 /gcc/diagnostic.c
parent1db02437806fb3155563914b496e26d7a8edfa65 (diff)
downloadgcc-7cb32822701d0ce49aae361f576c9c9dc31bb2f3.zip
gcc-7cb32822701d0ce49aae361f576c9c9dc31bb2f3.tar.gz
gcc-7cb32822701d0ce49aae361f576c9c9dc31bb2f3.tar.bz2
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
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c10
1 files changed, 2 insertions, 8 deletions
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