From 1ebe4b4fa0b30f6ef7cb18404def5854745b5912 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 5 Oct 2010 15:28:39 +0100 Subject: opts-common.c (handle_option, [...]): Add diagnostic_context parameter. * opts-common.c (handle_option, handle_generated_option, read_cmdline_option, set_option): Add diagnostic_context parameter. Update calls among these functions. (set_option): Don't use global_dc. * opts.c (read_cmdline_options): Pass global_dc to read_cmdline_option. (decode_options): Pass global_dc to enable_warning_as_error. (common_handle_option): Pass global_dc to enable_warning_as_error. (enable_warning_as_error): Add diagnostic_context parameter. Document parameters. Don't use global_dc. Pass diagnostic_context parameter to handle_generated_option. * opts.h (set_option, handle_option, handle_generated_option, read_cmdline_option, enable_warning_as_error): Add diagnostic_context parameter. * Makefile.in (lto-opts.o): Update dependencies. * coretypes.h (struct diagnostic_context, diagnostic_context): Declare here. * diagnostic.h (diagnostic_context): Don't declare typedef here. * gcc.c (process_command): Pass global_dc to read_cmdline_option. * langhooks-def.h (struct diagnostic_context): Don't declare here. (lhd_print_error_function, lhd_initialize_diagnostics): Declare using diagnostic_context typedef. * langhooks.c (lhd_initialize_diagnostics): Declare using diagnostic_context typedef. * langhooks.h (struct diagnostic_context): Don't declare here. (initialize_diagnostics, print_error_function): Declare using diagnostic_context typedef. * lto-opts.c: Include diagnostic.h. (lto_reissue_options): Pass global_dc to set_option. Pass DK_UNSPECIFIED not 0. * plugin.c (plugins_internal_error_function): Declare using diagnostic_context typedef. * plugin.h (struct diagnostic_context): Don't declare here. (plugins_internal_error_function): Declare using diagnostic_context typedef. c-family: * c-common.h (struct diagnostic_context): Don't declare here. (c_common_initialize_diagnostics): Declare using diagnostic_context typedef. * c-opts.c (c_common_handle_option): Pass global_dc to handle_generated_option. cp: * cp-tree.h (cxx_print_error_function, cxx_initialize_diagnostics): Declare using diagnostic_context typedef. From-SVN: r164991 --- gcc/cp/cp-tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/cp/cp-tree.h') diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index fa62570..e4f2412 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -5430,7 +5430,7 @@ extern void cxx_print_xnode (FILE *, tree, int); extern void cxx_print_decl (FILE *, tree, int); extern void cxx_print_type (FILE *, tree, int); extern void cxx_print_identifier (FILE *, tree, int); -extern void cxx_print_error_function (struct diagnostic_context *, +extern void cxx_print_error_function (diagnostic_context *, const char *, struct diagnostic_info *); @@ -5594,7 +5594,7 @@ extern alias_set_type cxx_get_alias_set (tree); extern bool cxx_warn_unused_global_decl (const_tree); extern size_t cp_tree_size (enum tree_code); extern bool cp_var_mod_type_p (tree, tree); -extern void cxx_initialize_diagnostics (struct diagnostic_context *); +extern void cxx_initialize_diagnostics (diagnostic_context *); extern int cxx_types_compatible_p (tree, tree); extern void init_shadowed_var_for_decl (void); -- cgit v1.1