aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-pretty-print.h
AgeCommit message (Collapse)AuthorFilesLines
2010-06-05c-common.c: Move to c-family/.Steven Bosscher1-213/+0
gcc/ChangeLog: * c-common.c: Move to c-family/. * c-common.def: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-format.h : Likewise. * c-gimplify.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c.opt: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pragma.h: Likewise. * c-pretty-print.c: Likewise. * c-pretty-print.h: Likewise. * c-semantics.c: Likewise. * stub-objc.c: Likewise. * gengtype.c (get_file_langdir): Special-case files in c-family/. (get_output_file_with_visibility): Fix name for c-common.h. * c-config-lang.in: Update paths in gtfiles for files in c-family/. * c-tree.h: Update include path for moved files. * c-lang.c: Likewise. * c-lang.h: Likewise. * c-parser.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-objc-common.c: Likewise. * configure.ac: Make sure c-family/ exists in the build directory. * configure: Regenerate. * Makefile.in: Update paths for moved files. Regroup files per location and update dependencies. Move generated_files down after ALL_GTFILES_H. * config/spu/spu-c.c: Update paths for moved files. * config/mep/mep-pragma.c: Likewise. * config/darwin-c.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/i386-c.c: Likewise. * config/avr/avr-c.c: Likewise. * config/sol2-c.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm-c.c: Likewise. * config/h8300/h8300.c: Likewise. * config/v850/v850-c.c: Likewise. * config/t-darwin: Fix dependencies for moved files. * config/t-sol2: Fix dependencies for moved files. * config/mep/t-mep: Fix dependencies for moved files. * config/ia64/t-ia64: Fix dependencies for moved files. * config/rs6000/t-rs6000: Fix dependencies for moved files. * config/v850/t-v850: Fix dependencies for moved files. * config/v850/t-v850e: Fix dependencies for moved files. * config/m32c/m32c-pragma.c * po/exgettext: Look in c-family/ also. c-family/ChangeLog: * c-common.c: Include gt-c-family-c-common.h. * c-pragma.c: Include gt-c-family-c-pragma.h. objc/ChangeLog: * objc-act.c: Update include path for moved files. * objc-lang.c: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. objcp/ChangeLog: * objcp-lang.c: Update include path for moved files. * config-lang.in: Update paths in gtfiles for files in c-family/. cp/ChangeLog: * typeck.c: Update include path for moved files. * decl.c: Likewise. * rtti.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * cxx-pretty-print.h: Likewise. * decl2.c: Likewise. * parser.c: Likewise. * cp-objcp-common.c: Likewise. * cp-tree.h: Likewise. * name-lookup.c: Likewise. * lex.c: Likewise. * name-lookup.h: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. * Make-lang.in: Likewise. From-SVN: r160330
2010-06-04re PR c/25880 (improve message of warning for discarding qualifiers)Manuel López-Ibáñez1-0/+1
2010-06-04 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c/25880 * c-objc-common.c (c_tree_printer): Handle %V, %v and %#v. * c-format.c (gcc_diag_flag_specs): Add hash. (gcc_cxxdiag_flag_specs): Use gcc_diag_flag_specs directly. (gcc_tdiag_char_table,gcc_cdiag_char_table): Handle %V and %v. * c-pretty-print.c (pp_c_cv_qualifier): Rename as pp_c_cv_qualifiers. Handle qualifiers spelling here. (pp_c_type_qualifier_list): Call the function above. * c-pretty-print.h (pp_c_cv_qualifiers): Declare. * c-typeck.c (handle_warn_cast_qual): Print qualifiers. (WARN_FOR_QUALIFIERS): New macro. (convert_for_assignment): Use it. testsuite/ * gcc.dg/assign-warn-2.c: Update. * gcc.dg/cpp/line3.c: Update. * gcc.dg/c99-array-lval-8.c: Update. * gcc.dg/cast-qual-2.c: Update. * gcc.dg/c99-arraydecl-3.c: Update. * gcc.dg/assign-warn-1.c: Update. * gcc.dg/format/gcc_diag-1.c: Update. From-SVN: r160274
2009-05-01c-objc-common.c (c_tree_printer): Print identifiers with pp_identifier, not ↵Joseph Myers1-1/+2
pp_string. * c-objc-common.c (c_tree_printer): Print identifiers with pp_identifier, not pp_string. Mark "({anonymous})" for translation. * c-pretty-print.c (pp_c_ws_string): New. (pp_c_cv_qualifier, pp_c_type_specifier, pp_c_specifier_qualifier_list, pp_c_parameter_type_list, pp_c_storage_class_specifier, pp_c_function_specifier, pp_c_attributes, pp_c_bool_constant, pp_c_constant, pp_c_primary_expression, pp_c_postfix_expression, pp_c_unary_expression, pp_c_shift_expression, pp_c_relational_expression, pp_c_equality_expression, pp_c_logical_and_expression, pp_c_logical_or_expression): Mostly use pp_string and pp_c_ws_string in place of pp_identifier and pp_c_identifier for non-identifiers. Mark English strings for translation. * c-pretty-print.h (pp_c_ws_string): Declare. cp: * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id, pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression, pp_cxx_new_expression, pp_cxx_delete_expression, pp_cxx_unary_expression, pp_cxx_assignment_operator, pp_cxx_assignment_expression, pp_cxx_expression, pp_cxx_function_specifier, pp_cxx_decl_specifier_seq, pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq, pp_cxx_exception_specification, pp_cxx_direct_declarator, pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement, pp_cxx_namespace_alias_definition, pp_cxx_template_parameter, pp_cxx_canonical_template_parameter, pp_cxx_template_declaration, pp_cxx_declaration, pp_cxx_typeid_expression, pp_cxx_va_arg_expression, pp_cxx_offsetof_expression, pp_cxx_trait_expression): Mostly use pp_string and pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier for non-identifiers. Mark English strings for translation. * cxx-pretty-print.h (pp_cxx_ws_string): Define. * error.c (dump_template_parameter, dump_template_bindings, dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl, dump_decl, dump_template_decl, dump_function_decl, dump_parameters, dump_exception_spec, dump_template_parms, dump_expr, dump_binary_op, dump_unary_op, op_to_string, assop_to_string, args_to_string, cp_print_error_function, print_instantiation_full_context, print_instantiation_partial_context): Mostly use pp_string and pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier for non-identifiers. Mark English strings for translation. (dump_global_iord): Mark strings for translation; use longer strings instead of substituting single words. (function_category): Return a format string marked for translation, not a single word or phrase to substitute in a longer phrase. From-SVN: r147033
2007-07-26Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton1-5/+4
License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
2006-05-18Whitespace fixupsMike Stump1-2/+2
From-SVN: r113893
2005-12-30c-pretty-print.h (struct c_pretty_print_info): Add new member "constant".Gabriel Dos Reis1-0/+3
2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net> * c-pretty-print.h (struct c_pretty_print_info): Add new member "constant". (pp_constant): New macro. * c-pretty-print.c (pp_c_pretty_printer_init): Set pp->constant. cp/ 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net> * cxx-pretty-print.c (pp_cxx_constant): New. Print string-literal in parens if input program says so. (pp_cxx_primary_expression): Hand off constant printing to pp_cxx_constant. (pp_cxx_pretty_printer_init): Set pp->c_base.constant. (pp_cxx_expression): Use pp_cxx_constant for literals. * error.c (dump_expr): Use pp_constant for literals. From-SVN: r109176
2005-07-20Make CONSTRUCTOR use VEC to store initializers.Giovanni Bajo1-0/+1
* c-common.c (complete_array_type): Update to cope with VEC in CONSTRUCTOR_ELTS. * c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts. (pp_c_constructor_elts): New function. * c-pretty-print.h (pp_c_constructor_elts): Declare. * c-typeck.c (build_function_call, build_c_cast, digest_init, struct constructor_stack, struct initializer_stack, constructor_elements, push_init_level, pop_init_level, add_pending_init, find_init_member, output_init_element): Update to cope with VEC in CONSTRUCTOR_ELTS. * coverage.c (build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * expr.c (categorize_ctor_elements_1, store_constructor, expand_expr_real_1): Likewise. * fold-const.c (fold_ternary): Likewise. * gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl, gimplify_init_constructor, gimplify_expr): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR node. * tree-pretty-print.c (dump_generic_node): Update to cope with VEC in CONSTRUCTOR_ELTS. * tree-sra.c (generate_element_init_1): Likewise. * tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * tree-vect-generic.c (expand_vector_piecewise): Likewise. * tree-vect-transform.c (vect_get_vec_def_for_operand): (get_initial_def_for_reduction): Likewise. * tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses value handle in annotations. * tree.c (tree_node_kind, tree_code_size, make_node_stat, tree_node_structure): Add support for constr_kind. (build_vector_from_ctor, build_constructor_single, build_constructor_from_list): New functions. (build_constructor): Update to take a VEC instead of a TREE_LIST. (simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree): Update to cope with VEC in CONSTRUCTOR_ELTS. * tree.def (CONSTRUCTOR): Make it a tcc_exceptional node. * tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT, CONSTRUCTOR_APPEND_ELT): New macros. (struct constructor_elt, struct tree_constructor): New data types. (union tree_node): Add tree_constructor field. * treestruct.def: Define TS_CONSTRUCTOR. * varasm.c (const_hash_1, compare_constant, copy_constant, compute_reloc_for_constant, output_addressed_constants, initializer_constant_valid_p, output_constant, array_size_for_constructor, output_constructor): Update to cope with VEC in CONSTRUCTOR_ELTS. * vec.h (VEC_empty, VEC_copy): New macros. ada/ Make CONSTRUCTOR use VEC to store initializers. * decl.c (gnat_to_gnu_entity): Update to cope with VEC in CONSTRUCTOR_ELTS. * trans.c (extract_values): Likewise. * utils.c (convert, remove_conversions): Likewise. * utils2.c (contains_save_expr_p, build_binary_op, build_unary_op, gnat_build_constructor): Likewise. cp/ Make CONSTRUCTOR use VEC to store initializers. * call.c (convert_default_arg): Update call to digest_init. * class.c (dump_class_hierarchy, dump_array): Update to cope with VEC in CONSTRUCTOR_ELTS. * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise. (finish_compound_literal, digest_init): Update declaration. * decl.c (struct reshape_iter): New data type. (reshape_init_array): Rename to... (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS. (reshape_init): Rewrite from scratch. Split parts into... (reshape_init_array, reshape_init_vector, reshape_init_class, reshape_init_r): New functions. (check_initializer): Update call to reshape_init. Remove obsolete code. (initialize_artificial_var, cp_complete_array_type): Update to cope with VEC in CONSTRUCTOR_ELTS. * decl2.c (grokfield): Update calls to digest_init. (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS. * error.c (dump_expr_init_vec): New function. (dump_expr): Use dump_expr_init_vec. * init.c (build_zero_init, build_vec_init): Update to cope with VEC in CONSTRUCTOR_ELTS. (expand_default_init): Update call to digest_init. * parser.c (cp_parser_postfix_expression): Use a VEC for the initializers. (cp_parser_initializer_list): Build a VEC of initializers. * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC in CONSTRUCTOR_ELTS. * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer, ptm_initializer, class_initializer, get_pseudo_ti_init): Use build_constructor_from_list instead of build_constructor. * semantics.c (finish_compound_literal): Update call to digest_init. * tree.c (stabilize_init): Update to cope with VEC in CONSTRUCTOR_ELTS. * typeck.c (build_ptrmemfunc1): Likewise. * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1): Likewise. (store_init_value): Use build_constructor_from_list and update call to digest_init. (digest_init): Rewrite. (process_init_constructor): Rewrite from scratch. Split into... (process_init_constructor_array, picflag_from_initializer, process_init_constructor_record, process_init_constructor_union): New functions. (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE): New macros. (build_functional_cast): Use build_constructor_from_list instead of build_constructor. fortran/ Make CONSTRUCTOR use VEC to store initializers. * trans-array.c (gfc_build_null_descriptor, gfc_trans_array_constructor_value, gfc_conv_array_initializer): Update to cope with VEC in CONSTRUCTOR_ELTS. * trans-common.c (create_common): Likewise. * trans-expr.c (gfc_conv_structure): Likewise. * trans-stmt.c (gfc_trans_character_select): Use build_constructor_from_list instead of build_constructor. java/ Make CONSTRUCTOR use VEC to store initializers. * check-init.c (check_init): Update to cope with VEC in CONSTRUCTOR_ELTS. * class.c (make_field_value, make_method_value, get_dispatch_table, make_class_data, emit_symbol_table, emit_catch_table, emit_assertion_table): Use build_constructor_from_list instead of build_constructor. * constants.c (build_constants_constructor): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Update to cope with VEC in CONSTRUCTOR_ELTS. * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE, PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead of a TREE_LIST. * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in CONSTRUCTOR_ELTS. * parse.y (build_new_array_init): Use build_constructor_from_list instead of build_constructor. (patch_new_array_init): Update to cope with VEC in CONSTRUCTOR_ELTS. (array_constructor_check_entry): Likewise. objc/ Make CONSTRUCTOR use VEC to store initializers. * objc-act.c (objc_build_constructor): Use build_constructor_from_list instead of build_constructor. testsuite/ Make CONSTRUCTOR use VEC to store initializers. * g++.dg/ext/complit3.C: Check for specific error messages. * g++.dg/init/brace2.C: Update error message. * g++.dg/warn/Wbraces2.C: Likewise. From-SVN: r102182
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2004-05-31c-pretty-print.c (pp_c_left_bracket): Make a function.Gabriel Dos Reis1-1/+6
* c-pretty-print.c (pp_c_left_bracket): Make a function. (pp_c_right_bracket): Likewise. (pp_c_star): Likewise. (pp_c_ampersand): Define. * c-pretty-print.h (pp_c_left_bracket): Declare. (pp_c_right_bracket): Likewise. (pp_c_star): Likewise. (pp_c_ampersand): Likewise. cp/ * cxx-pretty-print.c (pp_cxx_colon_colon): Expor. (pp_cxx_begin_template_argument_list): Turn into a function. (pp_cxx_end_template_argument_list): Likewise. (pp_cxx_separate_with): Define. (pp_cxx_unqualified_id): Tidy. (pp_cxx_primary_expression): Likewise. (pp_cxx_postfix_expression): Likewise. (pp_cxx_expression): Likewise. (pp_cxx_simple_type_specifier): Likewise. (pp_cxx_type_specifier_seq): Likewise. (pp_cxx_parameter_declaration_clause): Likewise. (pp_cxx_exception_specification): Likewise. (pp_cxx_direct_declarator): Likewise. (pp_cxx_type_id): Likewise. * cxx-pretty-print.h (pp_cxx_whitespace): Export from cxx-pretty-print.c. (pp_cxx_left_paren): Likewise. (pp_cxx_right_paren): Likewise. (pp_cxx_left_brace): Likewise. (pp_cxx_right_brace): Likewise. (pp_cxx_left_bracket): Likewise. (pp_cxx_right_bracket): Likewise. (pp_cxx_dot): Likewise. (pp_cxx_identifier): Likewise. (pp_cxx_tree_identifier): Likewise. (pp_cxx_ampersand): New macro. (pp_cxx_star): Likewise. (pp_cxx_arrow): Likewise. (pp_cxx_semicolon): Likewise. (pp_cxx_complement): Likewise. (pp_cxx_begin_template_argument_list): Declaree. (pp_cxx_end_template_argument_list): Likewise. (pp_cxx_colon_colon): likewise. From-SVN: r82488
2004-05-13Merge tree-ssa-20020619-branch into mainline.Diego Novillo1-1/+4
From-SVN: r81764
2003-10-05c-pretty-print.c: Fix comment typos.Kazu Hirata1-1/+1
* c-pretty-print.c: Fix comment typos. * c-pretty-print.h: Likewise. * calls.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * cppfiles.c: Likewise. * final.c: Likewise. * function.c: Likewise. * gcov-io.h: Likewise. * gcse.c: Likewise. * genoutput.c: Likewise. * loop.c: Likewise. * postreload.c: Likewise. * reg-stack.c: Likewise. * regmove.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * simplify-rtx.c: Likewise. * tree-inline.c: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.md: Likewise. * config/sh/sh.h: Likewise. From-SVN: r72118
2003-09-18c-pretty-print.h (pp_type_specifier_seq): Fix thinko.Gabriel Dos Reis1-1/+1
* c-pretty-print.h (pp_type_specifier_seq): Fix thinko. * c-pretty-print.c: Fix formatting. (pp_c_integer_constant): Append type annotation to literals. Tidy. (pp_c_type_specifier): Tidy. (pp_c_compound_literal): New function. (pp_c_initializer): Simplify.. (pp_c_initializer_list): Likewise. (pp_c_brace_enclosed_initializer_list): New function. (pp_c_postfix_expression): Simplify. cp/ * error.c (dump_type): Simplify. Use pp_type_specifier_seq for "C" types. * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko. From-SVN: r71511
2003-09-07re PR c++/11762 (namespace aliasing ICE in warn_extern_redeclared_static)Gabriel Dos Reis1-0/+2
* c-pretty-print.h (pp_c_left_brace): Declare. (pp_c_right_brace): Likewise. * c-pretty-print.c (pp_c_left_brace): Now a function (pp_c_right_brace): Likewise. cp/ PR c++/11762 * error.c (dump_decl): Handle namespace-alias-definition. * decl.c (warn_extern_redeclared_static): There is no point in checking changes in storage class specifier for a namespace declaration. (duplicate_decls): Tidy diagnostic message. * cxx-pretty-print.c (pp_cxx_left_brace): New macro. (pp_cxx_right_brace): Likewise. (pp_cxx_original_namespace_definition): New function. (pp_cxx_namespace_alias_definition): Likewise. (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs. From-SVN: r71175
2003-08-25pretty-print.h (pp_maybe_newline_and_indent): New macro.Gabriel Dos Reis1-33/+73
* pretty-print.h (pp_maybe_newline_and_indent): New macro. * c-pretty-print.h (c_pretty_printer): Now typedef to the structure. Be consistent with pretty-print.h abd cxx-pretty-print.h (struct c_pretty_print_info): Document. Add new fields. (pp_type_specifier_seq): Rename from pp_c_type_specifier. (pp_direct_abstract_declarator): New macro. (pp_ptr_operator): Likewise. (pp_simple_type_specifier): Likewise. (pp_expression): Likewise. (pp_parameter_list): Rename from pp_parameter_declaration. * c-pretty-print.c (pp_c_whitespace): Now a function. (pp_c_left_paren): Likewise. (pp_c_right_paren): Likewise. (pp_c_dot): Likewise. (pp_c_ampersand): Likewise. (pp_c_arrow): Likewise. (pp_c_semicolon): Likewise. (pp_c_type_cast): New function. (pp_c_space_for_pointer_operator): Likewise. (pp_c_call_argument_list): Likewise. (pp_c_cv_qualifier): Adjust prototype. (pp_c_type_qualifier_list): Likewise. (pp_c_pointer): Likewise. Handle REFERENCE_TYPE here. (pp_c_type_specifier): Rename from pp_c_simple_type_specifier. Adjust to follow standard grammar. (pp_c_specifier_qualifier_list): Adjusr prototype. Handle REFERENCE_TYPE. Tidy. (pp_c_parameter_type_list): Adjust prototype. Tidy. (pp_c_parameter_declaration): Remove. (pp_c_abstract_declarator): Adjust prototype. (pp_c_direct_abstract_declarator): Likewise. (pp_c_type_id): Likewise. (pp_c_storage_class_specifier): Likewise. (pp_c_function_specifier): Likewise. (pp_c_declaration_specifiers): Likewise. (pp_c_direct_declarator): Likewise. (pp_c_declarator): Likewise. (pp_c_declarator): Likewise. (pp_c_declaration): Likewise. (pp_c_attributes): Likewise. Tidy. (pp_c_function_definition): Adjust prototype. (pp_c_char): Likewise. (pp_c_string_literal): Likewise. (pp_c_integer_constant): Likewise. (pp_c_character_constant): Likewise. (pp_c_bool_constant): Likewise. (pp_c_enumeration_constant): Likewise. (pp_c_floating_constant): Likewise. (pp_c_constant): Likewise. (pp_c_identifier): Likewise. (pp_c_primary_expression): Likewise. Remove TARGET_EXPR case. Tidy. (pp_c_initializer): Adjust prototype. (pp_c_init_declarator): Likewise. (pp_c_initializer_list): Likewise. (pp_c_id_expression): Likewise. (pp_c_postfix_expression): Likewise. (pp_c_expression_list): Likewise. (pp_c_unary_expression): Likewise. (pp_c_cast_expression): Likewise. (pp_c_multiplicative_expression): Likewise. (pp_c_additive_expression): Likewise. (pp_c_shift_expression): Likewise. (pp_c_relational_expression): Likewise. (pp_c_equality_expression): Likewise. (pp_c_and_expression): Likewise. (pp_c_exclusive_or_expression): Likewise. (pp_c_inclusive_or_expression): Likewise. (pp_c_logical_and_expression): Likewise. (pp_c_logical_or_expression): Likewise. (pp_c_conditional_expression): Likewise. (pp_c_assignment_expression): Likewise. (pp_c_expression): Likewise. Tidy. (pp_c_statement): Likewise. Document. (pp_c_pretty_printer_init): Adjust prototype. Tidy. * c-lang.c (c_initialize_diagnostics): Update. * c-common.h (strip_pointer_operator): Declare. * c-common.c (strip_pointer_operator): Define. cp/ * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag. (cxx_pretty_printer): Adjust base type. (pp_cxx_function_specifier): Declare. * cxx-pretty-print.c (pp_cxx_whitespace): New macro. (pp_cxx_left_paren): Likewise. (pp_cxx_right_paren): Likewise. (pp_cxx_dot): Likewise. (pp_cxx_arrow): Likewise. (pp_cxx_semicolon): Likewise. (pp_cxx_identifier): Likewise. (pp_cxx_cv_qualifier_seq): Likewise. (pp_cxx_storage_class_specifier): Likewise. (pp_cxx_expression_list): Likewise. (pp_cxx_space_for_pointer_operator): Likewise. (pp_cxx_init_declarator): Likewise. (pp_cxx_call_argument_list): Likewise. (pp_cxx_nonconsecutive_character): Tidy. (pp_cxx_conversion_function_id): New function. (pp_cxx_template_id): Likewise. (pp_cxx_class_name): Likewise. (pp_cxx_template_keyword_if_needed): Likewise. (pp_cxx_nested_name_specifier): Likewise. (pp_cxx_unqualified_id): Tidy (pp_cxx_qualified_id): Handle more nodes. (pp_cxx_primary_expression): Tidy. (pp_cxx_postfix_expression): Likewise. (pp_cxx_new_expression): Tidy. (pp_cxx_delete_expression): Likewise. (pp_cxx_cast_expression): New function. (pp_cxx_pm_expression): Tidy. (pp_cxx_conditional_expression): Likewise. (pp_cxx_assignment_operator): New function. (pp_cxx_assignment_expression): Tidy. (pp_cxx_expression): New function. (pp_cxx_function_specifier): Likewise. (pp_cxx_decl_specifier_seq): Likewise. (pp_cxx_simple_type_specifier): Tidy. (pp_cxx_type_specifier_seq): Likewise. (pp_cxx_ptr_operator): New function. (pp_cxx_implicit_parameter_type): Likewise. (pp_cxx_parameter_declaration): Tidy. (pp_cxx_parameter_declaration_clause): New function. (pp_cxx_exception_specification): Likewise. (pp_cxx_direct_declarator): Tidy. (pp_cxx_declarator): Likewise. (pp_cxx_ctor_initializer): New function. (pp_cxx_function_definition): Likewise. (pp_cxx_abstract_declarator): Tidy. (pp_cxx_direct_abstract_declarator): Likewise. (pp_cxx_type_id): Likewise. (pp_cxx_exception_declaration): New function. (pp_cxx_statement): Likewise. (pp_cxx_simple_declaration): Likewise. (pp_cxx_template_parameter_list): Likewise. (pp_cxx_template_parameter): Likewise. (pp_cxx_template_declaration): Likewise. (pp_cxx_explicit_specialization): Likewise. (pp_cxx_explicit_instantiation): Likewise. (pp_cxx_declaration): Tidy. (pp_cxx_pretty_printer_init): Initialize more fields. From-SVN: r70777
2003-08-10pretty-print.c (pp_base_indent): Rename from pp_indent.Gabriel Dos Reis1-56/+47
* pretty-print.c (pp_base_indent): Rename from pp_indent. * c-pretty-print.h (pp_c_pretty_print_flag)s: New datatype. (struct c_pretty_print_info): Add more fields. (pp_c_left_paren): Move to c-pretty-print.c. (pp_c_right_paren): Likewise. (pp_c_left_brace): Likewise. (pp_c_right_brace): Likewise. (pp_c_left_bracket): Likewise. (pp_c_right_bracket): Likewise. (pp_c_declarator): Declare. (pp_c_direct_declarator): Likewise. (pp_c_specifier_qualifier_list): Likewise. (pp_c_type_id): Likewise. * c-pretty-print.c (pp_c_cv_qualifier): Change prootype. Rework.. (pp_c_type_qualifier_list): New. (pp_c_pointer): Likewise. (pp_c_parameter_type_list): Likewise. (pp_c_function_definition): Likewise. (pp_c_id_expression): Likewise. (pp_c_simple_type_specifier): Tidy. (pp_c_unary_expression): Likewise. (pp_c_expression): Likewise. (pp_c_pretty_printer_init): Likewise. (pp_c_specifier_qualifier_list): Rework.. (pp_c_abstract_declarator): Likewise. (pp_c_postfix_expression): Likewise. (pp_c_primary_expression): Likewise. (pp_c_cast_expression): Likewise. (pp_c_direct_abstract_declarator): Likewise. (pp_c_storage_class_specifier): Likewise. (pp_c_function_specifier): Likewise. (pp_c_declaration_specifiers): Likewise. (pp_c_direct_declarator): Likewise. (pp_c_declarator): Likewise. (pp_c_declaration): Likewise. (pp_c_statement): Likewise. (pp_c_integer_constant): Rename from pp_c_integer_literal. (pp_c_character_constant): Rename from pp_c_character_literal. (pp_c_bool_constant): Rename from pp_c_bool_literal. (pp_c_enumeration_constant): Rename from pp_c_enumerator. (pp_c_floating_constant): Rename from pp_c_real_literal. (pp_c_constant): Rename from pp_c_literal. * c-lang.c: Include diagnostic.h and c-pretty-print.h (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. (c_initialize_diagnostics): New. * Makefile.in (c-lang.o): Update dependency. cp/ * error.c (dump_expr): Tidy. * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New. (pp_cxx_begin_template_argument_list): Likewise. (pp_cxx_end_template_argument_list): Likewise. (is_destructor_name): Likewise. (pp_cxx_unqualified_id): Likewise. (pp_cxx_qualified_id): Likewise. (pp_cxx_id_expression): Likewise. (pp_cxx_new_expression): Likewise. (pp_cxx_delete_expression): Likewise. (pp_cxx_pm_expression): Likewise. (pp_cxx_type_specifier): Rework. (pp_cxx_type_id): Likewise. (pp_cxx_primary_expression): Likewise. (pp_cxx_postfix_expression): Likewise. (pp_cxx_unary_expression): Likewise. (pp_cxx_multiplicative_expression): Likewise. (pp_cxx_conditional_expression): Likewise. (pp_cxx_assignment_expression): Likewise. (pp_cxx_pretty_printer_init): Tidy. From-SVN: r70299
2003-08-05pretty-print.h (pp_set_line_maximum_length): Make macro.Gabriel Dos Reis1-0/+3
* pretty-print.h (pp_set_line_maximum_length): Make macro. (pp_set_prefix): Likewise. (pp_destroy_prefix): Likewise. (pp_remaining_character_count_for_line): Likewise. (pp_clear_output_area): Likewise. (pp_formatted_text): Likewise. (pp_last_position_in_text): Likewise. (pp_emit_prefix): Likewise. (pp_append_text): Likewise. (pp_flush): Likewise. (pp_format_text): Likewise. (pp_format_verbatim): Likewise. (pp_tree_identifier): Tidy. * pretty-print.c (pp_base_format_text): Rename from pp_format_text. (pp_base_format_verbatim): Rename from pp_format_verbatim. (pp_base_flush): Rename from pp_flush. (pp_base_set_line_maximum_length): Rename from pp_set_line_maximum_length. (pp_base_clear_output_area): Rename from pp_clear_output_area. (pp_base_set_prefix): Rename from pp_set_prefix. (pp_base_destroy_prefix): Rename from pp_destroy_prefix. (pp_base_emit_prefix): Rename from pp_emit_prefix. (pp_base_append_text): Rename from pp_append_text. (pp_base_formatted_text): Rename from pp_formatted_text. (pp_base_last_position_in_text): Rename from pp_last_position_in_text. (pp_base_remaining_character_count_for_line): Rename from pp_remaining_character_count_for_line. * diagnostic.h (diagnostic_format_decoder): Tidy. (diagnostic_flush_buffer): Likewise. * c-pretty-print.h: (pp_c_string_literal): Declare. (pp_c_real_literal): Likewise. (pp_c_integer_literal): Likewise. * c-pretty-print.c (pp_c_char): Use pp_string in lieu of pp_identifier. (pp_c_character_literal): Tidy. (pp_c_string_literal): Make public. (pp_c_bool_literal): Likewise. (pp_c_integer_literal): Likewise. (pp_c_real_literal): Likewise. * Makefile.in (C_PRETTY_PRINT_H): New variable. (c-pretty-print.o): Update dependence. cp/ * cxx-pretty-print.h: New file. * cxx-pretty-print.c: Likewise. * error.c (scratch_pretty_printer): Change type. (init_error): Tidy. (dump_aggr_type): Likewise. (dump_global_iord): Likewise. (dump_expr): Likewise. (dump_char): Remove. * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. (cxx_initialize_diagnostics): New function. * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o (CXX_PRETTY_PRINT_H): New variable. (cp/cxx-pretty-print.o): New rule. (cp/cp-lang.o): Update dependence. (cp/error.o): Likewise. From-SVN: r70182
2003-07-25Remove pedwarn_with_decl, warning_with_decl and error_with_decl from GCC.Gabriel Dos Reis1-5/+4
Remove pedwarn_with_decl, warning_with_decl and error_with_decl from GCC. * calls.c (try_to_integrate): Don't use xxx_with_decl. (expand_call): Likewise. * dwarfout.c (output_reg_number): Likewise. * expr.c (expand_expr): Likewise. * function.c (assign_temp): Likewise. (uninitialized_vars_warning): Likewise. (setjmp_args_warning): Likewise. (expand_function_end): Likewise. * stmt.c (fixup_gotos): Likewise. (warn_about_unused_variables): Likewise. (expand_end_bindings): Likewise. * stor-layout.c (layout_decl): Likewise. (place_field): Likewise. * toplev.c (check_global_declarations): Likewise. (rest_of_handle_inlining): Likewise. (default_tree_printer): New function. (general_init): Initialize diagnostic machinery before routing signals to the ICE machinery. Set default tree printer. * toplev.h (pedwarn_with_decl): Remove declaration. (warning_with_decl): Likewise. (error_with_decl): Likewise. (pedwarn): Remove attribute for the time being. * tree-inline.c (expand_call_inline): Don't use xxx_with_decl. * varasm.c (named_section): Likewise. (make_decl_rtl): Likewise. (assemble_variable): Likewise. (merge_weak): Likewise. (declare_weak): Likewise. * diagnostic.h: Move non-diagnostic stuff into pretty-print.h. * diagnostic.c: Move non-diagnostic stuff into pretty-print.c. (format_with_decl): Remove. (diagnostic_for_decl): Likewise. (pedwarn_with_decl): Likewise. (warning_with_decl): Likewise. (error_with_decl): Likewise. (diagnostic_initialize): Adjust. (diagnostic_count_diagnostic): Likewise. (announce_function): Likewise. (lhd_print_error_function): Likewise. (diagnostic_report_current_module): Likewise. (default_diagnostic_starter): Likewise. (diagnostic_report_diagnostic): Likewise. (default_diagnostic_finalizer): Likewise. (verbatim): Likewise. (error): Likewise. (warning): Likewise. * opts.c (common_handle_option): Likewise. * pretty-print.c: New file. * c-pretty-print.h (pp_base): Override. * c-pretty-print.c: Adjust use of macros throughout. (pp_buffer): New macro. (pp_newline): Likewise. * c-objc-common.c (c_tree_printer): Adjust prototype. Tidy. * Makefile.in (DIAGNOSTIC_H): New variable. (c-errors.o): Use it. (c-objc-common.o): Likewise. (c-common.o): Likewise. (c-opts.o): Likewise. (c-format.o): Likewise. (diagnostic.o): Likewise. (opts.o): Likewise. (toplev.o): Likewise. (rtl-error.o): Likewise. (dwarf2out.o): Likewise. (jump.o): Likewise. (pretty-print.o): New rule. cp/ * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H. * error.c: Use the new pretty-printer fraamework. From-SVN: r69773
2003-06-22c-lex.c: Convert to ISO C90.Andreas Jaeger1-15/+15
* c-lex.c: Convert to ISO C90. * c-objc-common.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.h: Likewise. * c-pretty-print.c: Likewise. * c-pretty-print.h: Likewise. * c-semantics.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. From-SVN: r68327
2003-01-18alias.c: Fix comment typos.Kazu Hirata1-1/+1
* alias.c: Fix comment typos. * basic-block.h: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.h: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfglayout.c: Likewise. * cfgrtl.c: Likewise. * convert.c: Likewise. * cpphash.h: Likewise. * cpplex.c: Likewise. * cpplib.h: Likewise. * df.h: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dwarf2.h: Likewise. From-SVN: r61462
2002-12-20c-pretty-print.h: Fix comment typos.Kazu Hirata1-2/+2
* c-pretty-print.h: Fix comment typos. * integrate.c: Likewise. * varasm.c: Likewise. * config/c4x/c4x.h: Likewise. * config/c4x/c4x.md: Likewise. * config/fr30/fr30.md: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/i386.h: Likewise. * config/ia64/ia64.c: Likewise. * config/ia64/ia64.h: Likewise. * config/ip2k/ip2k.md: Likewise. * config/m68hc11/m68hc11-crt0.S: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/m68hc11/m68hc11.md: Likewise. * config/m68hc11/m68hc12.h: Likewise. * config/mcore/mcore.md: Likewise. * config/mips/mips.c: Likewise. * config/mips/mips.md: Likewise. * config/mmix/mmix-modes.def: Likewise. * config/pa/pa.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rs6000/rs6000.h: Likewise. * config/rs6000/rs6000.md: Likewise. From-SVN: r60354
2002-08-14c-pretty-print.h: Guard against multiple inclusion.Gabriel Dos Reis1-57/+77
* c-pretty-print.h: Guard against multiple inclusion. Robustify macros. (pp_c_attributes): Declare. * c-pretty-print.c (pp_c_attributes): New function. From-SVN: r56273
2002-08-13c-pretty-print.c: #include "c-tree.h".Gabriel Dos Reis1-16/+18
* c-pretty-print.c: #include "c-tree.h". (pp_c_simple_type_specifier): Tweak. (pp_c_storage_class_specifier): New. (pp_c_function_specifier): Likewise. (pp_c_declaration_specifiers): Likewise. (pp_c_init_declarator): Likewise. (pp_c_declaration): Likewise. (pp_c_direct_declarator): Stub. (pp_c_declarator): Likewise. (pp_c_parameter_declaration): Likewise. From-SVN: r56240
2002-07-30c-pretty-print.h (pp_c_statement): Declare.Gabriel Dos Reis1-3/+4
* c-pretty-print.h (pp_c_statement): Declare. * c-pretty-print.c (pp_c_postfix_expression): #if 0 support for SRCLOC. (pp_c_statement): Define. From-SVN: r55874
2002-07-29c-pretty-print.h (struct c_pretty_print_info): Add new member.Gabriel Dos Reis1-0/+3
2002-07-30 Gabriel Dos Reis <gdr@nerim.net> * c-pretty-print.h (struct c_pretty_print_info): Add new member. (pp_initializer): New macro. (pp_c_initializer): Declare. * c-pretty-print.c (pp_c_primary_expression): HAndle TARGET_EXPR. (pp_c_initializer): Define. (pp_c_initializer_list): New function. (pp_c_postfix_expression): Handle ABS_EXPR, COMPLEX_CST, VECTOR_CST, CONSTRUCTOR. (pp_c_unary_expression): Handle CONJ_EXPR, REALPART_EXPR, IMAGPART_EXPR. (pp_c_cast_expression): Handle FLOAT_EXPR. (pp_c_assignment_expression): Handle INIT_EXPR. (pp_c_expression): Update. From-SVN: r55856
2002-07-29Makefile.in (C_OBJS): Include c-pretty-print.oGabriel Dos Reis1-0/+139
2002-07-29 Gabriel Dos Reis <gdr@nerim.net> * Makefile.in (C_OBJS): Include c-pretty-print.o (c-pretty-print.o): Add depency rule. * pretty-print.h: Add more macros. * c-pretty-print.c: New file. * c-pretty-print.h: Likewise. cp/ 2002-07-29 Gabriel Dos Reis <gdr@nerim.net> * Make-lang.in (CXX_C_OBJS): Include. From-SVN: r55845