diff options
author | Gabriel Dos Reis <gdr@codesourcery.com> | 2002-06-02 19:06:30 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2002-06-02 19:06:30 +0000 |
commit | 27e511e0d56e4968abd1549b50b62071f22a224f (patch) | |
tree | be65308bcd5fc6c907af860b48e4f96e8e84c1aa /gcc | |
parent | 818b6b7fb170190ce8c9253895f200234b4a8880 (diff) | |
download | gcc-27e511e0d56e4968abd1549b50b62071f22a224f.zip gcc-27e511e0d56e4968abd1549b50b62071f22a224f.tar.gz gcc-27e511e0d56e4968abd1549b50b62071f22a224f.tar.bz2 |
diagnostic.h (struct diagnostic_context): Add new member internal_error.
* diagnostic.h (struct diagnostic_context): Add new member
internal_error.
(internal_error_function): Remove declaration.
* diagnostic.c (internal_error_function): Remove definition..
(internal_error): Adjust use.
ada/
* misc.c (gnat_init): Adjust setting of internal_error_function.
From-SVN: r54179
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/misc.c | 2 | ||||
-rw-r--r-- | gcc/diagnostic.c | 18 | ||||
-rw-r--r-- | gcc/diagnostic.h | 6 |
5 files changed, 18 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1bf04eb..dc8a45d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2002-06-02 Gabriel Dos Reis <gdr@codesourcery.com> + + * diagnostic.h (struct diagnostic_context): Add new member + internal_error. + (internal_error_function): Remove declaration. + * diagnostic.c (internal_error_function): Remove definition.. + (internal_error): Adjust use. + 2002-06-02 Richard Henderson <rth@redhat.com> * rtl.h (CC0_P): New. diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b4b6161..a17ab03 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2002-06-02 Gabriel Dos Reis <gdr@codesourcery.com> + + * misc.c (gnat_init): Adjust setting of internal_error_function. + 2002-06-01 Joseph S. Myers <jsm28@cam.ac.uk> * gnat_ug.texi: Use @ifnottex instead of @ifinfo. diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index 63ac00a..3bc01d3 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -384,7 +384,7 @@ gnat_init (filename) gnat_argc++; gnat_argv[gnat_argc] = 0; - set_internal_error_function (internal_error_function); + global_dc->internal_error = &internal_error_function; /* Show that REFERENCE_TYPEs are internal and should be Pmode. */ internal_reference_types (); diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 027ea53..f276ec0 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -1236,20 +1236,6 @@ fatal_error VPARAMS ((const char *msgid, ...)) exit (FATAL_EXIT_CODE); } -/* Report a compiler error at the current line number. Allow a front end to - intercept the message. */ - -static void (*internal_error_function) PARAMS ((const char *, va_list *)); - -/* Set the function to call when a compiler error occurs. */ - -void -set_internal_error_function (f) - void (*f) PARAMS ((const char *, va_list *)); -{ - internal_error_function = f; -} - void internal_error VPARAMS ((const char *msgid, ...)) { @@ -1270,8 +1256,8 @@ internal_error VPARAMS ((const char *msgid, ...)) } #endif - if (internal_error_function != 0) - (*internal_error_function) (_(msgid), &ap); + if (global_dc->internal_error != 0) + (*global_dc->internal_error) (_(msgid), &ap); set_diagnostic_context (&dc, msgid, &ap, input_filename, lineno, /* warn = */0); diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 925134a..3762136 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -203,6 +203,9 @@ struct diagnostic_context /* This function is called after the diagnostic message is printed. */ void (*end_diagnostic) PARAMS ((output_buffer *, diagnostic_context *)); + /* Client hook to report an internal error. */ + void (*internal_error) PARAMS ((const char *, va_list *)); + /* Hook for front-end extensions. */ void *x_data; }; @@ -275,9 +278,6 @@ extern diagnostic_context *global_dc; extern void set_diagnostic_context PARAMS ((diagnostic_context *, const char *, va_list *, const char *, int, int)); -extern void set_internal_error_function PARAMS ((void (*) - PARAMS ((const char *, - va_list *)))); extern void report_diagnostic PARAMS ((diagnostic_context *)); extern void diagnostic_initialize PARAMS ((diagnostic_context *)); extern void init_output_buffer PARAMS ((output_buffer *, |