summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-26 14:06:07 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-26 14:06:07 +0000
commitce601f2961447d75171fb0ca11d0b1e12b7e7364 (patch)
tree2c4cb21103202d0c4940fa8b9d5fb916a80a23ba /gcc/diagnostic.h
parente88e92d98b74a5f1d92d4d4ade21ebbd0cdbc592 (diff)
downloadgcc-ce601f2961447d75171fb0ca11d0b1e12b7e7364.tar.gz
* diagnostic.h (struct diagnostic_context): Add new field.
(lang_diagnostic_starter, lang_diagnostic_finalizer): Remove declaratons. (global_dc): Declare. * diagnostic.c (global_diagnostic_context): New variable. (global_output_buffer): Remove. (global_dc): Define. (lang_diagnostic_starter, lang_diagnostic_finalizer): Remove definitions. (initialize_diagnostics): Adjust initialization. (set_diagnostic_context): Adjust setting. cp/ * error.c (init_error): Adjust settings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r--gcc/diagnostic.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index fd3c92dfb39..fea82ba6039 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -132,6 +132,11 @@ struct output_buffer
the context of a diagnostic message. */
struct diagnostic_context
{
+ /* Where most of the diagnostic formatting work is done. In Object
+ Oriented terms, we'll say that diagnostic_context is a sub-class of
+ output_buffer. */
+ output_buffer buffer;
+
/* The diagnostic message to output. */
const char *message;
@@ -185,9 +190,6 @@ struct diagnostic_context
extern printer_fn lang_printer;
-extern diagnostic_starter_fn lang_diagnostic_starter;
-extern diagnostic_finalizer_fn lang_diagnostic_finalizer;
-
extern int diagnostic_message_length_per_line;
/* This output buffer is used by front-ends that directly output
@@ -196,6 +198,7 @@ extern int diagnostic_message_length_per_line;
avoided. This global buffer will go away, once all such usage
has been removed. */
extern output_buffer *diagnostic_buffer;
+extern diagnostic_context *global_dc;
#define diagnostic_kind_count(BUFFER, DK) \
(BUFFER)->state.diagnostic_count[(int) DK]