diff options
author | Gabriel Dos Reis <gdr@codesourcery.com> | 2000-08-23 06:36:15 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2000-08-23 06:36:15 +0000 |
commit | a72462a4fd95e8a3f54d9a7a775a7f8ecbf9c4f0 (patch) | |
tree | 71830271f8ba82612a1073f7afd37c3a5f48f070 /gcc | |
parent | 697c2a39640d554db2843d5998329b6d6bdf3794 (diff) | |
download | gcc-a72462a4fd95e8a3f54d9a7a775a7f8ecbf9c4f0.zip gcc-a72462a4fd95e8a3f54d9a7a775a7f8ecbf9c4f0.tar.gz gcc-a72462a4fd95e8a3f54d9a7a775a7f8ecbf9c4f0.tar.bz2 |
decl.c (init_decl_processing): Remove bogus initialization.
* decl.c (init_decl_processing): Remove bogus initialization.
* error.c (lang_print_error_function): Restore here.
(init_error): Initialize print_error_function.
From-SVN: r35902
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 | ||||
-rw-r--r-- | gcc/cp/error.c | 15 |
3 files changed, 21 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 22466d7..8ddd8a0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> + + * decl.c (init_decl_processing): Remove bogus initialization. + * error.c (lang_print_error_function): Restore here. + (init_error): Initialize print_error_function. + 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> * decl2.c (arg_assoc): Revert my 2000-08-11 change. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index d6ee50f..f035f2f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6651,7 +6651,6 @@ init_decl_processing () /* Show we use EH for cleanups. */ using_eh_for_cleanups (); - print_error_function = NULL; valid_lang_attribute = cp_valid_lang_attribute; /* Maintain consistency. Perhaps we should just complain if they diff --git a/gcc/cp/error.c b/gcc/cp/error.c index d58c7f1..012bbcf 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -97,6 +97,7 @@ static void dump_scope PARAMS ((tree, enum tree_string_flags)); static void dump_template_parms PARAMS ((tree, int, enum tree_string_flags)); static const char *function_category PARAMS ((tree)); +static void lang_print_error_function PARAMS ((const char *)); static void maybe_print_instantiation_context PARAMS ((output_buffer *)); static void print_instantiation_full_context PARAMS ((output_buffer *)); static void print_instantiation_partial_context PARAMS ((output_buffer *, tree, @@ -152,6 +153,7 @@ init_error () gcc_obstack_init (&scratch_obstack); scratch_firstobj = (char *)obstack_alloc (&scratch_obstack, 0); + print_error_function = lang_print_error_function; lang_diagnostic_starter = cp_diagnostic_starter; lang_diagnostic_finalizer = cp_diagnostic_finalizer; } @@ -2432,6 +2434,19 @@ cv_to_string (p, v) } static void +lang_print_error_function (file) + const char *file; +{ + output_state os; + + default_print_error_function (file); + os = output_buffer_state (diagnostic_buffer); + output_set_prefix (diagnostic_buffer, file); + maybe_print_instantiation_context (diagnostic_buffer); + output_buffer_state (diagnostic_buffer) = os; +} + +static void cp_diagnostic_starter (buffer, dc) output_buffer *buffer; diagnostic_context *dc; |