* pretty-print.h (struct pretty_print_info): Add
commita608187fcbe47b23b3a69b928505802f08950e23
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 May 2009 10:28:34 +0000 (10 10:28 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 May 2009 10:28:34 +0000 (10 10:28 +0000)
treea02bdc44763aa1057cf075a959ca0e50e4188797
parent6cc403884a5c96cc201f1c1a772f64b0eb3da096
* pretty-print.h (struct pretty_print_info): Add
translate_identifiers.
(pp_translate_identifiers): New.
(pp_identifier): Only conditionally translate identifier to locale
character set.
* pretty-print.c (pp_construct): Set pp_translate_identifiers.
(pp_base_tree_identifier): Only conditionally translate identifier
to locale character set.
* c-pretty-print.c (M_): Define.
(pp_c_type_specifier, pp_c_primary_expression): Mark English
fragments for conditional translation with M_.
* tree-pretty-print.c (maybe_init_pretty_print): Disable
identifier translation.

cp:
* call.c (name_as_c_string): Call type_as_string_translate.
Translate identifiers to locale character set.
* cp-tree.h (lang_decl_name): Update prototype.
(type_as_string_translate, decl_as_string_translate,
cxx_printable_name_translate): Declare.
* cxx-pretty-print.c (M_): Define.
(pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
English fragments for conditional translation with M_.
* decl.c (grokdeclarator): Translate identifiers to locale
character set for diagnostics.
* error.c (M_): Define.
(dump_template_bindings, dump_type, dump_aggr_type,
dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
dump_function_decl, dump_template_parms, dump_expr,
dump_binary_op, op_to_string, assop_to_string): Mark English
fragments for conditional translation with M_.
(type_as_string): Disable translation of identifiers.
(type_as_string_translate): New.
(expr_as_string): Disable translation of identifiers.
(decl_as_string): Disable translation of identifiers.
(decl_as_string_translate): New.
(lang_decl_name): Add parameter translate.
(args_to_string): Call type_as_string_translate.
(cp_print_error_function): Call cxx_printable_name_translate.
(print_instantiation_full_context,
print_instantiation_partial_context): Call
decl_as_string_translate.
* parser.c (cp_lexer_get_preprocessor_token): Use %qE for
identifier in diagnostic.
* tree.c (cxx_printable_name): Change to
cxx_printable_name_internal.  Add parameter translate.
(cxx_printable_name, cxx_printable_name_translate): New wrappers
round cxx_printable_name_internal.

objc:
* objc-act.c: Include intl.h.
(objc_lookup_protocol): Use complete sentences for diagnostics
with %qE for identifiers and translating results of
gen_type_name_0 to locale character set.
(objc_check_decl, check_protocol_recursively,
lookup_and_install_protocols, objc_build_string_object,
objc_get_class_reference, objc_declare_alias, objc_declare_class,
objc_get_class_ivars, error_with_ivar, check_duplicates,
objc_finish_message_expr, objc_build_protocol_expr,
objc_build_selector_expr, build_ivar_reference, objc_add_method,
add_category, add_instance_variable, objc_is_public,
check_methods, check_methods_accessible, check_protocol,
start_class, finish_class, start_protocol, really_start_method,
get_super_receiver, objc_lookup_ivar): Use %E and %qE for
identifiers in diagnostics.  Translate generated text to locale
character set as needed.
(check_protocol, check_protocols): Change name parameter to type
tree.
(lang_report_error_function): Remove.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147333 138bc75d-0d04-0410-961f-82ee72b054a4
15 files changed:
gcc/ChangeLog
gcc/c-pretty-print.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/cxx-pretty-print.c
gcc/cp/decl.c
gcc/cp/error.c
gcc/cp/parser.c
gcc/cp/tree.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/pretty-print.c
gcc/pretty-print.h
gcc/tree-pretty-print.c